From df672688de878d603a6d7840914e633dccd8477d Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Mon, 17 Sep 2018 15:32:44 -0500 Subject: [PATCH] [history-substring-search] Fix bindkey back to what works Just binding ^[[A/^[[B does not work for some terminals, while not binding them breaks zle widgets on other terminals. That's how crazy it can get :- ( Fixes #293. Fixes #295. --- modules/history-substring-search/init.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/history-substring-search/init.zsh b/modules/history-substring-search/init.zsh index 933b07c..2d8ea43 100644 --- a/modules/history-substring-search/init.zsh +++ b/modules/history-substring-search/init.zsh @@ -8,3 +8,8 @@ source ${0:h}/external/zsh-history-substring-search.zsh || return 1 # Binding ^[[A/^[[B manually mean up/down works with history-substring-search both before and after zle-line-init bindkey '^[[A' history-substring-search-up bindkey '^[[B' history-substring-search-down + +# Bind up and down keys +zmodload -F zsh/terminfo +p:terminfo +bindkey "${terminfo[kcuu1]}" history-substring-search-up +bindkey "${terminfo[kcud1]}" history-substring-search-down