history-substring-search: bind arrows in both vi and emacs keymaps

This commit is contained in:
Andrew Janke 2015-07-27 21:32:26 -04:00
commit e8678be701

View file

@ -15,9 +15,13 @@ fi
# Bind terminal-specific up and down keys
if [[ -n "$terminfo[kcuu1]" ]]; then
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up
bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up
bindkey -M vicmd "$terminfo[kcuu1]" history-substring-search-up
fi
if [[ -n "$terminfo[kcud1]" ]]; then
bindkey "$terminfo[kcud1]" history-substring-search-down
bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down
bindkey -M viins "$terminfo[kcud1]" history-substring-search-down
bindkey -M vicmd "$terminfo[kcud1]" history-substring-search-down
fi