summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.completion-widget
diff options
context:
space:
mode:
Diffstat (limited to 'dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.completion-widget')
-rw-r--r--dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.completion-widget19
1 files changed, 19 insertions, 0 deletions
diff --git a/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.completion-widget b/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.completion-widget
new file mode 100644
index 00000000..509b82d9
--- /dev/null
+++ b/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.completion-widget
@@ -0,0 +1,19 @@
+#!/bin/zsh
+local 0=${(%):-%N}
+
+$0() {
+ typeset -gH curcontext=${WIDGET}:::
+
+ local +h -a comppostfuncs=( ${(%):-%N}.post "$comppostfuncs[@]" )
+ compstate[old_list]=
+ _main_complete _autocomplete.history_lines
+
+ unset curcontext
+ (( _lastcomp[nmatches] ))
+}
+
+$0.post() {
+ compstate[insert]='menu:0'
+}
+
+$0 "$@"