2015-12-15 06:12:17 +01:00
|
|
|
#
|
2018-04-24 16:04:44 +02:00
|
|
|
# Enable searching history with substrings
|
2015-12-15 06:12:17 +01:00
|
|
|
#
|
|
|
|
|
2018-04-24 16:04:44 +02:00
|
|
|
# Source script
|
2015-12-15 06:12:17 +01:00
|
|
|
source ${0:h}/external/zsh-history-substring-search.zsh || return 1
|
|
|
|
|
2018-09-16 19:01:52 +02:00
|
|
|
# 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
|
2018-09-17 22:32:44 +02:00
|
|
|
|
|
|
|
# Bind up and down keys
|
|
|
|
zmodload -F zsh/terminfo +p:terminfo
|
2019-09-25 20:42:51 +02:00
|
|
|
if [[ -n ${terminfo[kcuu1]} && -n ${terminfo[kcud1]} ]]; then
|
|
|
|
bindkey ${terminfo[kcuu1]} history-substring-search-up
|
|
|
|
bindkey ${terminfo[kcud1]} history-substring-search-down
|
|
|
|
fi
|