dotfiles/dot_oh-my-zsh/plugins/history-substring-search/history-substring-search.plugin.zsh

16 lines
452 B
Bash
Raw Normal View History

2020-06-15 10:31:33 +00:00
0=${(%):-%N}
source ${0:A:h}/history-substring-search.zsh
# Bind terminal-specific up and down keys
if [[ -n "$terminfo[kcuu1]" ]]; then
bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up
bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up
fi
if [[ -n "$terminfo[kcud1]" ]]; then
bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down
bindkey -M viins "$terminfo[kcud1]" history-substring-search-down
fi