nodejs / repl

REPL rewrite for Node.js ✨🐢🚀✨
MIT License
177 stars 25 forks source link

Standard autocomplete behavior #32

Closed bogdan closed 4 years ago

bogdan commented 5 years ago

I am a little surprised that autocomplete works differently from any other major implementation like Bash, ZSH etc. The only way to use a suggested completion is press "right" key which is located to the side of the keyboard and requires a very inconvenient hand move.

Don't you want to really complete the expression when there is only one variant or otherwise list variants like in Bash?

devsnek commented 5 years ago

totally agree, feel free to send a pr.

devsnek commented 5 years ago

I updated Tab to show a list instead of cycling the inline completion. Next on my list is jumping on completions like P will jump to Pro for Promise and Proxy.

caub commented 5 years ago

There's some bug if you press space at the middle of the completion

repl-bug-complete-space

the sequences of keys I've pressed:

f
right
left
space
space
right
right
right
space
right

the completion should be removed if we press space