terminal navigation: supporting more common key combinations
Hi!
I find this tool super useful, so thank you for creating it!
I see there is support for common keyboard combinations, like Ctrl+L. Is there any chance to support other common combinations?
| keys | action |
|---|---|
Ctrl + left arrow |
move the cursor to one word backwards |
Ctrl + right arrow |
move the cursor to one word forward |
Home |
move the cursor to the line start |
End |
move the cursor to the line end |
Ctrl + W |
delete the previous word |
I'm happy to contribute if you point me to the right place (sorry, Go noob here). I've had look around lib/terminal, but I'm not sure where the keystrokes are handled.
Thank you so much in advance!
Interactive shell use https://github.com/chzyer/readline. And here is a list of available shortcuts: https://github.com/chzyer/readline/blob/master/doc/shortcut.md
I can't say what I will do about that in the future, since it depends on external libraries, but I will keep your request in mind.
Oh, I see! Thanks for sharing the shortcuts, and for keeping the request in mind.