mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2024-11-28 14:20:20 +00:00
18 lines
700 B
Bash
18 lines
700 B
Bash
#
|
|
# No plugin manager is needed to use this file. All that is needed is adding:
|
|
# source {where-unpacked}/history-search-multi-word.plugin.zsh
|
|
# to ~/.zshrc.
|
|
#
|
|
|
|
ZERO="${(%):-%N}" # this gives immunity to functionargzero being unset
|
|
HSMW_REPO_DIR="${ZERO%/*}"
|
|
if [[ -z "$ZPLG_CUR_PLUGIN" && "${fpath[(r)$HSMW_REPO_DIR]}" != $HSMW_REPO_DIR ]]; then
|
|
fpath+=( "$HSMW_REPO_DIR" )
|
|
fi
|
|
|
|
autoload history-search-multi-word
|
|
zle -N history-search-multi-word
|
|
zle -N history-search-multi-word-backwards history-search-multi-word
|
|
zle -N history-search-multi-word-pbackwards history-search-multi-word
|
|
zle -N history-search-multi-word-pforwards history-search-multi-word
|
|
bindkey "^R" history-search-multi-word
|