I've set Bash to use vi keybindings with
set -o vi, but I'd like to keep the Emacs-style Ctrl-p and Ctrl-n bindings for cycling through history. I've read the "bind" section in bash(1) and tried variations of the following:
bind -m vi-insert "\C-p": previous-history bind -m vi-insert "\C-n": next-history
It seems that none of the
bind commands I issue have any effect, though. The output of
bind -P is always unchanged afterwards. How can I change the keybindings for these commands?