Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: REPL commands #1090

Open
bmundt6 opened this issue Dec 4, 2019 · 2 comments
Open

Feature request: REPL commands #1090

bmundt6 opened this issue Dec 4, 2019 · 2 comments
Labels

Comments

@bmundt6
Copy link

bmundt6 commented Dec 4, 2019

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) -> ...).

@rhendric
Copy link
Collaborator

rhendric commented Dec 4, 2019

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.

@bmundt6
Copy link
Author

bmundt6 commented Dec 4, 2019

The main two that I use are .load and .save.
.help and .clear are also very useful but not as much to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants