diff --git a/82-completion.zsh b/82-completion.zsh index ad2898d..81b9670 100644 --- a/82-completion.zsh +++ b/82-completion.zsh @@ -33,12 +33,16 @@ zinit wait'!0' lucid light-mode depth=1 for \ atload"!_zsh_autosuggest_start" \ zsh-users/zsh-autosuggestions -zstyle ":history-search-multi-word" page-size "$(($LINES/2))" -zstyle ":plugin:history-search-multi-word" clear-on-cancel "yes" -zinit wait'!0' lucid light-mode depth=1 for \ - zdharma-continuum/history-search-multi-word \ - atload"bindkey '^[[A' history-substring-search-up; \ - bindkey '^[[B' history-substring-search-down; \ - bindkey '^K' history-search-multi-word " \ - zsh-users/zsh-history-substring-search +if [ -n ${ZSH_MC_SUBSHELL+set} ] && [ -n ${SSH_CONNECTION+set} ]; then + zinit load zsh-users/zsh-history-substring-search +else + zstyle ":history-search-multi-word" page-size "$(($LINES/2))" + zstyle ":plugin:history-search-multi-word" clear-on-cancel "yes" + zinit wait'!0' lucid light-mode depth=1 for \ + zdharma-continuum/history-search-multi-word \ + atload"bindkey '^[[A' history-substring-search-up; \ + bindkey '^[[B' history-substring-search-down; \ + bindkey '^K' history-search-multi-word " \ + zsh-users/zsh-history-substring-search +fi