From 1aa7d7a4015b6dfe412295f8656b32bc9fbfae6f Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Tue, 24 Apr 2018 09:04:44 -0500 Subject: [PATCH] [history-substring-search] Only load terminfo feature of zsh/terminfo like we did for the input module in 7861145, and to make modules independent of each other, as discussed in #261. --- modules/history-substring-search/init.zsh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/modules/history-substring-search/init.zsh b/modules/history-substring-search/init.zsh index fc02836..619bda0 100644 --- a/modules/history-substring-search/init.zsh +++ b/modules/history-substring-search/init.zsh @@ -1,14 +1,11 @@ # -# enables searching history with substrings +# Enable searching history with substrings # -# source script +# Source script source ${0:h}/external/zsh-history-substring-search.zsh || return 1 -# bind UP and DOWN keys +# 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 - -# bind UP and DOWN arrow keys (compatibility fallback) -bindkey '^[[A' history-substring-search-up -bindkey '^[[B' history-substring-search-down