2016-05-26 09:14:39 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2016-06-09 21:21:18 +02:00
|
|
|
# This gives immunity to functionargzero being unset
|
|
|
|
# _ will be set to last argument to source builtin
|
|
|
|
PLUGIN_UNDERSCORE="$_"
|
|
|
|
[ "$0" != "$PLUGIN_UNDERSCORE" ] && 0="$PLUGIN_UNDERSCORE"
|
|
|
|
|
2016-05-26 09:14:39 +02:00
|
|
|
REPO_DIR="${0%/*}"
|
|
|
|
if [[ -z "$ZPLG_CUR_PLUGIN" && "${fpath[(r)$REPO_DIR]}" != $REPO_DIR ]]; then
|
|
|
|
fpath+=( "$REPO_DIR" )
|
|
|
|
fi
|
|
|
|
|
2016-05-22 09:13:27 +02:00
|
|
|
autoload history-search-multi-word
|
2016-05-22 08:58:00 +02:00
|
|
|
zle -N history-search-multi-word
|
|
|
|
zle -N history-search-multi-word-backwards history-search-multi-word
|
|
|
|
bindkey "^R" history-search-multi-word
|