alichtman / shallow-backup

Git-integrated backup tool for macOS and Linux devs.
MIT License
1.22k stars 248 forks source link

Add support for arrow keys in "Custom commit message?" prompt (and all other prompts, also) #341

Closed alichtman closed 8 months ago

alichtman commented 8 months ago

Currently, input() is called for user input.

https://github.com/alichtman/shallow-backup/blob/608fd53eb2bd10724da31e8c0796c1a90fb41d24/shallow_backup/git_wrapper.py#L252-L254

https://github.com/alichtman/shallow-backup/blob/608fd53eb2bd10724da31e8c0796c1a90fb41d24/shallow_backup/prompts.py#L48

https://github.com/alichtman/shallow-backup/blob/608fd53eb2bd10724da31e8c0796c1a90fb41d24/shallow_backup/prompts.py#L23

It looks like this can be fixed with a simple readline import: https://stackoverflow.com/a/77773215.