1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-11 00:10:08 +00:00

Merge pull request #2511 from FloFra/master

Makes history-substring-search use term specific up and down buttons.
This commit is contained in:
Robby Russell 2014-04-19 12:54:10 -07:00
commit 5eb5f7138a

View file

@ -163,8 +163,13 @@ function history-substring-search-down() {
zle -N history-substring-search-up
zle -N history-substring-search-down
bindkey '\e[A' history-substring-search-up
bindkey '\e[B' history-substring-search-down
zmodload zsh/terminfo
if [[ -n "$terminfo[kcuu1]" ]]; then
bindkey "$terminfo[kcuu1]" history-substring-search-up
fi
if [[ -n "$terminfo[kcud1]" ]]; then
bindkey "$terminfo[kcud1]" history-substring-search-down
fi
#-----------------------------------------------------------------------------
# implementation details