Describe the problem
A potential suggestion/feeling check before I go ahead and try to contribute. We have a user of our CLI tool (which uses shiny TTY::Prompt) that was asking to be able to use the classic Ctrl combination for navigation and editing of a prompt.ask (Ctrl+A to go at the start of a line, Ctrl+E for end and Ctrl+W to erase the prefilled value).
How would the new feature work?
My instinct would be that we just need to add those 3 cases I mention in
|
elsif key_name.to_s =~ /ctrl_/ |
|
# skip |
to mirror the currently handling that's done with :home, :end and add one for erasing.
Drawbacks
Not sure if handling this would cause ripple effects through some other systems that expect it to be available.
Describe the problem
A potential suggestion/feeling check before I go ahead and try to contribute. We have a user of our CLI tool (which uses shiny TTY::Prompt) that was asking to be able to use the classic Ctrl combination for navigation and editing of a
prompt.ask(Ctrl+A to go at the start of a line, Ctrl+E for end and Ctrl+W to erase the prefilled value).How would the new feature work?
My instinct would be that we just need to add those 3 cases I mention in
tty-reader/lib/tty/reader.rb
Lines 338 to 339 in ac92571
Drawbacks
Not sure if handling this would cause ripple effects through some other systems that expect it to be available.