What I'm running:
% cat /etc/debian_version
12.0
% dpkg -l zsh | grep ii
ii zsh 5.9-4 amd64 shell with lots of features
Hi,
I've used zsh compctl since forever (late 90s or early 00s) but strangely never run into this before.
I realized today when I intended to make some compctl config for update-alternatives
that my completions where not triggered at all, it just used my standard fallback completion (files) ...
so a very stripped down simple example to show the problem:
This works fine:
~~~
zshprompt% compctl -k '(arg1 arg2 arg3)' nodash
# typing 'nodash ' and hitting [Tab] once:
zshprompt% nodash arg
# hitting [Tab again]zshprompt% nodash arg
arg1 arg2 arg3
~~~
But this complete files instead:
~~~
# just showing the current dir for reference:
zshprompt% ls .
file2.txt myfile1.txt
zshprompt% compctl -k '(arg1 arg2 arg3)' with-dash
# typing 'with-dash ' and hitting [Tab] once:
zshprompt% with-dash
file2.txt myfile1.txt
~~~
As seen, my standard completion (listing current directory) is used rather than the one I added with compctl ... I also tried this with a totally clean zsh (no distribution or user configuration) and that shows the same problem, commands without dashes triggers completion, but commands with dashes, does not.
I couldn't really find anything about this in the manpage (man zshcompctl) or online ...
Is it a bug, or am I missing something?
TIA,
/frax