LiveScript
LiveScript copied to clipboard
Feature request: REPL commands
Node allows the use of dot-first keywords as commands in the REPL, such as .load script.js
: https://nodejs.org/api/repl.html#repl_commands_and_special_keys
It would be nice to have functions implementing each of the commands for use in the repl - they don't actually need to use special syntax, since LiveScript already has command-like syntax for functions (e.g. could have a simple function load = (filename) -> ...
).
LiveScript's REPL only uses the Node.js REPL for tab completion; the actual interface you interact with is a custom Readline frontend backed by the vm
module. So any commands you want would have to be implemented from scratch.
Are there any that would be especially useful to you? The LS REPL already has a few special functions exposed; I'm not fundamentally opposed to adding more, but some of those commands look like they'd be tricky to reproduce faithfully.
The main two that I use are .load
and .save
.
.help
and .clear
are also very useful but not as much to me.