aboutsummaryrefslogtreecommitdiff
path: root/history-substring-search.plugin.zsh
blob: 7f14b38bc8cce7dd563d5fe728085239174b3f4b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# 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