nfischer / n_shell

A NodeJS REPL with ShellJS loaded by default
https://www.npmjs.com/package/n_shell
MIT License
8 stars 1 forks source link

[ feature ] Tab completion #4

Open nfischer opened 8 years ago

nfischer commented 8 years ago

This is a feature idea I have right now, for how to make this more usable. I'd like to see tab completion, not only for variables, but also for strings representing paths on the file system (similar to how Bash works by default).

$ ls()
foo.txt
bar.txt
baz.txt
$ cat('b➡️
$ cat('bar.txt'➡️
$ cat('baz.txt');
this is the context of baz.txt

The ➡️ denotes when I would press tab. Tab completion would happen in-place, not on a new line, but it was easier to show my idea this way.

It'd be even better if tab completion worked on other paths, such as cat('~/.bas➡️ ➡️ cat('~/.bashrc');.

amacfie commented 7 years ago

I believe you can get this fairly easily with rlwrap.