4

I know that this question has already been asked HERE but sadly none of the answers suggest a javascript standalone shell that has auto completion. I am reopening this question again, in the hope that some new answers might be found.

Community
  • 1
  • 1
esiegel
  • 1,743
  • 2
  • 18
  • 31

5 Answers5

5

According to this blog post, autocompletion is now available for Rhino, as long as the JLine library is included.

Matthew Trevor
  • 12,766
  • 5
  • 33
  • 46
2

edit: after using the node REPL a bit more, I've discovered this evaluation to be overly positive. There are some serious problems with its implementation, including an inability to yank killed text, issues with editing lines that are longer than the terminal width, and some other problems. It might be better to just use rhino.

The node.js REPL (node-repl on a system with node installed) is the best terminal-based, system-context shell I've seen so far. I'm comparing it to rhino and the built-in v8 shell. It provides tab-completion and line editing history, as well as syntax-colouring of evaluations. You can also import CommonJS modules, or at least those modules implemented by node.

Downside is that you have to build node. This is not a huge deal, as building apps goes, but might be a challenge if you don't normally do such things.

intuited
  • 20,786
  • 6
  • 57
  • 82
1

http://www.faqts.com/knowledge_base/view.phtml/aid/1438 lists some JavaScript interpreters. I am not about to download them to confirm they have (tab?) completion.

[I'm not sure what you mean by auto-completion, since that implies more of an IDE-type approach].

Is this for web-based development/debugging? If so, I can really recommend the squarefree JS shell bookmarklet for Firefox, which was listed in the linked post. True, it is not standalone, but does have tab completion.

Matthew Schinckel
  • 32,344
  • 6
  • 71
  • 109
1

Jash is a DHTML-based window that gives you command-line JavaScript access to the current browser window. With this console you can quickly run debug scripts. It has auto completion using the TAB key: http://www.billyreisinger.com/jash/

Firebug is a Firefox extension with an advanced command-line. It also features auto completion in the single line mode. See the full command line API: http://getfirebug.com/commandline.html

If you want a shell in you OS environment try Mozilla's Rhino Shell. This JavaScript shell provides a simple way to run scripts in batch mode or an interactive environment for exploratory programming.

aemkei
  • 10,657
  • 6
  • 34
  • 29
0

If you're looking at client side Javascript, have you looked at Firebug? It gives you command completion for the current window - including any pulled in libraries, etc?

You can run it as a plugin from Firefox, or include it in any web pages for other browsers (not sure whether completion works with firebug lite)

Martin
  • 1,328
  • 8
  • 11