history-substring-search.plugin.zsh 456 Bytes
Newer Older
1
2
0=${(%):-%N}
source ${0:A:h}/zsh-history-substring-search.zsh
3
4
5


# Bind terminal-specific up and down keys
6

7
if [[ -n "$terminfo[kcuu1]" ]]; then
8
9
  bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up
  bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up
10
11
fi
if [[ -n "$terminfo[kcud1]" ]]; then
12
13
  bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down
  bindkey -M viins "$terminfo[kcud1]" history-substring-search-down
14
15
fi