sdb
sdb copied to clipboard
Optionally specify readline editing-mode
Would folks be interested to support optional vi/vim and emacs editing mode in sdb that would be specified as a command argument? @ahrens @prakashsurya @pcd1193182 ?
This option would be dependent on the underlying readline library that your Python environment uses. If it is libedit for example, you will get an error message that changing keybindings is not supported. In most cases/installations though GNU readline is used which allows us to do things like this:
import readline
readline.parse_and_bind("set editing-mode vi")
https://docs.python.org/3/library/readline.html
I would definitely be interested in adding readline support. Getting tab completion, keybindings, and rsearch would all be super useful.
I believe we already use readline; and tab completion (perhaps the others, too) should currently work.
I think this issue is more about adding the ability to use vi key-bindings (e.g. similar to set -o vi in bash) with readline.
Ah, I see. I feel less strongly about that, since I just use the bash/emacs keybinds, but it's probably still a good idea.