zsh-workers
 help / color / mirror / code / Atom feed
* completion ( compctl ) does not trigger for command names containing dashes
@ 2023-05-03  9:59 Fredrik Ax
  2023-05-03 17:13 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Fredrik Ax @ 2023-05-03  9:59 UTC (permalink / raw)
  To: zsh-users, zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1437 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 3260 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-04 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03  9:59 completion ( compctl ) does not trigger for command names containing dashes Fredrik Ax
2023-05-03 17:13 ` Bart Schaefer
2023-05-04  7:52   ` Fredrik Ax
2023-05-04 10:36   ` Fredrik Ax

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).