Ensure $key_info is populated before use
This commit is contained in:
parent
6f916355b2
commit
1dfc0bf784
|
@ -28,17 +28,19 @@ fi
|
|||
# Key Bindings
|
||||
#
|
||||
|
||||
# Emacs
|
||||
bindkey -M emacs "$key_info[Control]P" history-substring-search-up
|
||||
bindkey -M emacs "$key_info[Control]N" history-substring-search-down
|
||||
if [[ -n $key_info ]]; then
|
||||
# Emacs
|
||||
bindkey -M emacs "$key_info[Control]P" history-substring-search-up
|
||||
bindkey -M emacs "$key_info[Control]N" history-substring-search-down
|
||||
|
||||
# Vi
|
||||
bindkey -M vicmd "k" history-substring-search-up
|
||||
bindkey -M vicmd "j" history-substring-search-down
|
||||
# Vi
|
||||
bindkey -M vicmd "k" history-substring-search-up
|
||||
bindkey -M vicmd "j" history-substring-search-down
|
||||
|
||||
# Emacs and Vi
|
||||
for keymap in 'emacs' 'viins'; do
|
||||
# Emacs and Vi
|
||||
for keymap in 'emacs' 'viins'; do
|
||||
bindkey -M "$keymap" "$key_info[Up]" history-substring-search-up
|
||||
bindkey -M "$keymap" "$key_info[Down]" history-substring-search-down
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue