diff options
author | Robby Russell <robby@planetargon.com> | 2014-04-19 12:54:10 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-04-19 12:54:10 -0700 |
commit | 5eb5f7138a0a70cf34285b25d1cc205c93f2c56d (patch) | |
tree | 5e9a4d6c462b4171e1824fbf39872b6eb56383f6 | |
parent | 8aa6e6a412258c6a8210a9a18c407377ac187c9d (diff) | |
parent | 5303793ef13b5dd3e7f52ac40f17fd37f015af44 (diff) | |
download | zsh-5eb5f7138a0a70cf34285b25d1cc205c93f2c56d.tar.gz zsh-5eb5f7138a0a70cf34285b25d1cc205c93f2c56d.tar.bz2 zsh-5eb5f7138a0a70cf34285b25d1cc205c93f2c56d.zip |
Merge pull request #2511 from FloFra/master
Makes history-substring-search use term specific up and down buttons.
-rw-r--r-- | plugins/history-substring-search/history-substring-search.zsh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh index 53f707c79..22f03dd6d 100644 --- a/plugins/history-substring-search/history-substring-search.zsh +++ b/plugins/history-substring-search/history-substring-search.zsh @@ -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 |