fix: Handle backspace in Bash#64
Conversation
Bash returns the ASCII code for DELETE instead of BACKSPACE when pressing backspace. Added a special case for that.
caksoylar
left a comment
There was a problem hiding this comment.
Seems to work fine for me (fixes backspace on fish, delete works OK; on bash, fixes backspace but delete still doesn't work which is better).
|
So I have more context: what's the reason for having rich and manual handling implementations? I assume rich didn't cover all our use cases, but is there opportunity to simplify the interface and not have to do manual input processing? Currently it's weird because when I run |
|
Rich prompts don't have anything close to the menu system, as far as I'm aware. Running a prompt function doesn't return until the user presses enter, so there's no way to use a prompt for the filter text but draw the menu as well. |
Delete is working for me on Bash (version 5.2.21) in WSL Ubuntu. Could you run import os
os.read(sys.stdin.fileno(), 4)
# press the delete keyI get >>> import os
>>> os.read(sys.stdin.fileno(), 4)
^[[3~ |
|
Sorry, red herring. I must have mixed up the testing, both backspace and delete work in bash/fish when I try now. |
Bash returns the ASCII code for DELETE instead of BACKSPACE when pressing backspace. Added a special case for that.
Likely fixes #63