zsh-autocomplete
zsh-autocomplete copied to clipboard
Implement trimming of `compctl` completion lists
There are still quit a few 3rd-party completion functions (mainly Python-related) that still rely on compctl
. Zsh Autocomplete, however, can currently trim only completion lists generated by compadd
. Thus, any completion that relies on compctl
can easily result in the dreaded zsh: do you wish to see all XXX possibilities (YYY lines)?
eating up your keystrokes.
Implementation notes:
-
_default
callscompcall
to generatecompctl
completions. -
compctl -L <command>
will print output in the form ofcompctl -K <function> <command>
. -
<command>
is stored in$_comp_command
. -
<function>
returns its list of completions in$reply
.