From: Fredrik Ax <fredrik@axnet.nu>
To: zsh-users@zsh.org, zsh-workers@zsh.org
Subject: completion ( compctl ) does not trigger for command names containing dashes
Date: Wed, 3 May 2023 11:59:10 +0200 [thread overview]
Message-ID: <CANPa6YCGPfzm29R+DN9P7-Pkx7Tkv9zf1HLueHTSPMv1aXUrOQ@mail.gmail.com> (raw)
[-- 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 --]
next reply other threads:[~2023-05-03 10:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 9:59 Fredrik Ax [this message]
2023-05-03 17:13 ` Bart Schaefer
2023-05-04 7:52 ` Fredrik Ax
2023-05-04 10:36 ` Fredrik Ax
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CANPa6YCGPfzm29R+DN9P7-Pkx7Tkv9zf1HLueHTSPMv1aXUrOQ@mail.gmail.com \
--to=fredrik@axnet.nu \
--cc=zsh-users@zsh.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).