Подбор запуска history-search-multi-word

This commit is contained in:
Andrei Astafev 2022-12-21 14:01:45 +03:00
parent 9aa3dec349
commit 9730fc1f5c

View File

@ -43,6 +43,7 @@ zinit wait'1' lucid light-mode depth'1' for \
zsh-users/zsh-history-substring-search zsh-users/zsh-history-substring-search
[ "$(lsb_release -c -s)" = "orel" ] && ZSH_HISTORY_SEARCH_MULTI_WORD_MODE=1 [ "$(lsb_release -c -s)" = "orel" ] && ZSH_HISTORY_SEARCH_MULTI_WORD_MODE=1
[ -n "${SSH_CONNECTION}" ] && ZSH_HISTORY_SEARCH_MULTI_WORD_MODE=2
zstyle ':history-search-multi-word' page-size "$((LINES/2))" zstyle ':history-search-multi-word' page-size "$((LINES/2))"
zstyle ':plugin:history-search-multi-word' clear-on-cancel 'yes' zstyle ':plugin:history-search-multi-word' clear-on-cancel 'yes'
@ -50,9 +51,12 @@ if [[ -z ${ZSH_HISTORY_SEARCH_MULTI_WORD_MODE+set} ]]; then
zinit wait'1' lucid light-mode depth'1' for \ zinit wait'1' lucid light-mode depth'1' for \
atload"bindkey '^K' history-search-multi-word" \ atload"bindkey '^K' history-search-multi-word" \
zdharma-continuum/history-search-multi-word zdharma-continuum/history-search-multi-word
else elif [ ${ZSH_HISTORY_SEARCH_MULTI_WORD_MODE} = "1" ]; then
zinit wait'2' lucid light-mode depth'1' for \ zinit wait'2' lucid light-mode depth'1' for \
atload"bindkey '^K' history-search-multi-word" \ atload"bindkey '^K' history-search-multi-word" \
zdharma-continuum/history-search-multi-word zdharma-continuum/history-search-multi-word
elif [ ${ZSH_HISTORY_SEARCH_MULTI_WORD_MODE} = "2" ]; then
zinit light zdharma-continuum/history-search-multi-word
bindkey '^K' history-search-multi-word
fi fi