summaryrefslogtreecommitdiff
path: root/dot-oh-my-zsh/custom/plugins/zsh-autocomplete/functions/widget/.autocomplete.history-search.completion-widget
blob: 509b82d94c10e9676a829d2a796379bf9023d703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 "$@"