2017-06-13 04:50:47 +00:00
|
|
|
# -*- Mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
|
|
|
# vim:ft=zsh:sw=4:sts=4:et
|
|
|
|
|
2016-05-26 07:14:39 +00: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.
|
|
|
|
#
|
|
|
|
|
2018-06-01 07:48:43 +00:00
|
|
|
0="${(%):-%N}" # this gives immunity to functionargzero being unset
|
|
|
|
HSMW_REPO_DIR="${0%/*}"
|
2016-10-09 07:24:03 +00:00
|
|
|
if [[ -z "$ZPLG_CUR_PLUGIN" && "${fpath[(r)$HSMW_REPO_DIR]}" != $HSMW_REPO_DIR ]]; then
|
|
|
|
fpath+=( "$HSMW_REPO_DIR" )
|
2016-05-26 07:14:39 +00:00
|
|
|
fi
|
|
|
|
|
2016-11-12 14:55:21 +00:00
|
|
|
autoload history-search-multi-word hsmw-context-main
|
2016-05-22 06:58:00 +00:00
|
|
|
zle -N history-search-multi-word
|
|
|
|
zle -N history-search-multi-word-backwards history-search-multi-word
|
2016-09-20 06:46:46 +00:00
|
|
|
zle -N history-search-multi-word-pbackwards history-search-multi-word
|
|
|
|
zle -N history-search-multi-word-pforwards history-search-multi-word
|
2016-11-03 10:49:07 +00:00
|
|
|
[[ "${+termcap[Co]}" = 1 && "${termcap[Co]}" = "256" ]] && {
|
|
|
|
zstyle ":history-search-multi-word" highlight-color "bg=17"
|
|
|
|
typeset -gA HSMW_HIGHLIGHT_STYLES
|
|
|
|
HSMW_HIGHLIGHT_STYLES[variable]="fg=112"
|
|
|
|
}
|
2016-05-22 06:58:00 +00:00
|
|
|
bindkey "^R" history-search-multi-word
|