diff options
Diffstat (limited to 'dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.zle-widget')
| m--------- | dot-oh-my-zsh | 0 | ||||
| -rw-r--r-- | dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.zle-widget | 47 |
2 files changed, 0 insertions, 47 deletions
diff --git a/dot-oh-my-zsh b/dot-oh-my-zsh new file mode 160000 +Subproject 6fe84bf5c82da7b1f6d7c5ec3e5c447721ac8ce diff --git a/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.zle-widget b/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.zle-widget deleted file mode 100644 index acf23b8e..00000000 --- a/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.zle-widget +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/zsh -local 0=${(%):-%N} -builtin zle -C ${0}.context list-choices ${0}.context - -${0}.context() { - # Inside a completion widget, the current quote level is removed. So, we should not include - # $QIPREFIX/$QISUFFIX in our pattern or it won't match. - lcontext=${LBUFFER%${(~j:*:)words[1,CURRENT-1]}*$IPREFIX$PREFIX} - lcontext+=${lcontext:+ }${(pj:\0:)${(@b)words}} - rcontext=${RBUFFER#$SUFFIX$ISUFFIX*${(~j:*:)words[CURRENT+1,-1]}} -} - -${0}() { - local -P lbuffer="$LBUFFER" rbuffer="$RBUFFER" - local -P keymap_menuselect="$( builtin bindkey -M menuselect -L )" - { - builtin bindkey -M menuselect -s \ - '^R' '^_^_^R' \ - '^S' '^_^_^S' - builtin bindkey -M menuselect \ - '\e[D' .backward-char \ - '\eOD' .backward-char \ - '\e[C' .forward-char \ - '\eOC' .forward-char - - setopt $_autocomplete__comp_opts[@] $_autocomplete__ctxt_opts[@] - - local lcontext= rcontext= - builtin zle ${(%):-%N}.context - LBUFFER="$lcontext" - RBUFFER="$rcontext" - - [[ -o sharehistory ]] && - fc -RI # Get new history events from file. - builtin zle _history_search - - } always { - builtin bindkey -M menuselect -r '^R' '^S' '\e'{\[,O}{D,C} - eval "$keymap_menuselect" - if [[ $BUFFER == $lcontext$rcontext ]] then - LBUFFER="$lbuffer" - RBUFFER="$rbuffer" - fi - } -} - -$0 "$@" |
