Recently I've been working with JS and I'm very enthusiastic about this language. I know that there is node.js for running JS at server side, but is there a shell that uses JS as a scripting language? If such thing exists, how usable & stable is it?
Does this look desirable to you?
If so, ShellJS could be interesting, it's
I'm unsure if this could be used as a full-featured login shell, though. (Maybe with some wrapping?) You could argue that it's not really a shell, but do you know TermKit? It's made of Node.js + Webkit, you could use JS to extend it (I guess); the shell language is still Bash(-ish). |
|||||
|
Mozilla INC offers a Example of a javascript shell in a system shell :
No problems detected since I use it for testing purpose. |
||||
|
If you're on Ubuntu or any other debian based system, you may install rhino (from Mozilla.org).
It supplies js via alternatives:
So calling either rhino or js will give you a JavaScript shell. Edit (2014-06-30): rhino is good to quickly test some javascript code in a file, but it is not an interactive shell, so it doesn't support GNU readline style of editing. For interactive work, you may prefer |
||||
|
In Chrome and Firefox, if you press F12 it brings up developer tools. Over there you could find a tab called console, where you could type and test JavaScript scripts. It has code completion and other features too. |
|||||
|