You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By using the Node.js REPL module we get by free and heavily tested the readline and history and all the functionality available on the Node.js console, just would only need to set a custom eval() function to allow to instantiate system commands, but also we get a Javascript interpreter so we can use Javascript scripts and functions on the shell. For example, with some hacks, it would be feasable to do something like:
>ls-a # Shell-likecommand['.','..']>vara=ls('a')// Javascript instructionundefined>console.log(a)['.','..']>echo$a// Echo would be an alias of console.log()['.','..']
The semantics would need a review, but but you can see what's the idea ;-)
The text was updated successfully, but these errors were encountered:
I think it's parallel to nsh but I really like the idea of a JavaScript system REPL. CoffeeScript is a bit more terse however, and as much as I generally avoid it, it might make a better REPL.
There are a few difficulties around doing job-control, tty-stuff, and signal handling. Just warning you that there may be some madness going forward. You have to make sure that keyboard commands are sent to child processes such as vim when those programs are in the foreground.
By using the Node.js REPL module we get by free and heavily tested the readline and history and all the functionality available on the Node.js console, just would only need to set a custom eval() function to allow to instantiate system commands, but also we get a Javascript interpreter so we can use Javascript scripts and functions on the shell. For example, with some hacks, it would be feasable to do something like:
The semantics would need a review, but but you can see what's the idea ;-)
The text was updated successfully, but these errors were encountered: