react-console-emulator
react-console-emulator copied to clipboard
Feature request: Command completion
It would be great to have a command autocompletion and possibly a callback to provide further completions.
Similar to how it's done here https://github.com/rohanchandra/javascript-terminal/blob/af6ab7c18e595341c3e2d5a79e07f68cb51ef2c2/src/emulator/auto-complete.js
I would try to implement this as a PR but wanted to open an issue first to get feedback. Maybe @linuswillner you already have some thoughts about it?
Hmm. This feature has not been suggested to me before; however, I do think it might be worth implementing, considering how often this kind of feature is used in native terminals and the immense amount of utility it provides.
However, unfortunately, due to being rather occupied in my private life for the time being, it would probably take a good while for me to have time to work on this myself. If you can find a solid way to implement this system, I'd be more than happy to accept a PR for it. 😄
I opened a PR that adds a callback function prop that is called on tab, That way you can implement command completion on your own:
https://github.com/linuswillner/react-console-emulator/pull/898