1
0
Fork 0
mirror of synced 2024-12-22 14:11:06 -05:00

[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.
This commit is contained in:
Eric Nielsen 2018-04-24 09:04:44 -05:00
parent 4acd1b8533
commit 1aa7d7a401

View file

@ -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