From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, HTML_MESSAGE,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13789 invoked from network); 3 May 2023 10:00:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 May 2023 10:00:30 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1683108030; b=NVepZxOlCMIjMIN2epryaI3BrK2A9fW0ImMNpO1qLgvZMkzo17bNfa/c6kskTd6F3U6aHkYCVx fhUu5k25UZGmpkzJ2HiDIoJFhkdPVkYGVUUc8N/PS41LEPZVkf0k/J3297TStImZv2Qs9AC4PB T+R3d4MXETYqeAu2IhspWyWzEF6qB+ctexXvfILw/QosCmSs8pi+CGRUeeMQ5jYixAbaO5gdeZ f8+VD3J1H5VT2cNNvtRloKZxjT8NBf0JmAZGfwzF/YLIWp3agIITzZ/pOfgelP3zVjChY62yVx CIfsd4EijypLE6swGzwEZymNvOIjyg0TYhjXPiayl4slgg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vs1-f54.google.com) smtp.remote-ip=209.85.217.54; dmarc=none header.from=axnet.nu; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1683108030; bh=sk6WqnoAKHAG5ERIMkQuFB271e1aafaJFtwvBztgxXU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature; b=qf4IV4l72CJTGnOBphyS2uyLoBc+mI0clQd5APqdwVEVJfuBSk8We8fZHySgmdWGiCYx3DawQp q+x+t36nBGcALLMiOTXAN2zkPQ6N6G8nT4rG9XbVsTfs5mqvwvAOfqQKIblFs0P1UqIl+HNvov a1dHxhR4phK+01Q2U4s8COPpUlninXLse919L3qOSzC4EFp9PMJ3glh5TkEE40oF4T6I0qchL3 elmkElqS/Q12tD4Se75JA5t8NEOtg693FCf/Om05IbW4qFvAxpR0zGT9ZIanmTLacXkBXOMrtL gIFZEM17rDtfPH/YB3+tTtj0GlWK1jnIdmdHGyQg6SK2Ig==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=mpQmG7QDa/y3euHyCQgDB0PTVhIJadAsygkqRhW1AOs=; b=Kf9ukTps3Ew8GFiqC0+6UkR7xX MNF7LeRLiagqz0WnjS6FwLyrh7gdIRLQydjU7ICACq+O9MYvJGAu43CZRoeZuZbaPoLmNoN6c1i5H Y+9oSMSk62/yWC4DQZujprDhQ697MYxpiY8liMjlxuSPGPJzZTyVl2NGt6xBTvWUQEv1xf1GaqO8W 9xbOP+miWznk8HkElhauo5xWJ+BlhbfI3WR6c6Tfk67fr6d1d9HVqEx2Xh+Kd4pVL+UWKZb4BWega 3cK5ejmHMiV2pg113LXF2mIdIij3CfgxMm/Z7O7Hzr0gXEJyiSqy1pPnJ5s2TajsvNUFGL2JAETHc 5oQ10Hqw==; Received: by zero.zsh.org with local id 1pu9Hf-0006ky-Do; Wed, 03 May 2023 10:00:27 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vs1-f54.google.com) smtp.remote-ip=209.85.217.54; dmarc=none header.from=axnet.nu; arc=none Received: from mail-vs1-f54.google.com ([209.85.217.54]:59713) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1pu9Gd-00061p-9w; Wed, 03 May 2023 09:59:24 +0000 Received: by mail-vs1-f54.google.com with SMTP id ada2fe7eead31-42e35b7290fso1836930137.3; Wed, 03 May 2023 02:59:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683107962; x=1685699962; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=mpQmG7QDa/y3euHyCQgDB0PTVhIJadAsygkqRhW1AOs=; b=iI/Ey9FbAINkcZYst7jzkcoJ72CfoYCF1T7Ab6gLtALjH0434eSaP0zCrPlBwLTQCd d3mJyTZAh0UkrBX+E34VaoKFVsXMispKaGBo0Yo8WFYdcaZ2eZZ2RS0vLcWQ67lO45cY 5MvAFbn7EtzvtAhcg6j6esDU1DiA3ybOtKsnJSABCAwVcDH5wUbjHiXBnpUxFTmbJ+3e iDbxlyUvUy965tHg6Q20h79bDOKDGkMJ5O+o9ftK5GjPsGmrO+fsKmjDMcmBfu+kYAI6 QYwQARjySDUDVILjitDfT7DbuSnDOUCledgeeYqVIaOteDVgJVEnzWfD/5f/drVBjA5J G25A== X-Gm-Message-State: AC+VfDz5Cz4Ki3LFBQf0k9qH+5jMLE+cY9cJj/uuK+PNEH3YPN1FNYIk yRX3E1xzcxwAUhLv/mWBp5gg9WuRVzRozVemfKa+Y0X2hsw9Kw== X-Google-Smtp-Source: ACHHUZ5BYZheM9xIckRGtalATB/65rEIW+8Wv6C2ktR1yp1wUI3LJ6zklmT6l8qrxweEFyZH6vZ38s9CBro4fpSt8sI= X-Received: by 2002:a05:6102:259:b0:426:2a37:4a6b with SMTP id a25-20020a056102025900b004262a374a6bmr1039265vsq.25.1683107961961; Wed, 03 May 2023 02:59:21 -0700 (PDT) MIME-Version: 1.0 From: Fredrik Ax Date: Wed, 3 May 2023 11:59:10 +0200 Message-ID: Subject: completion ( compctl ) does not trigger for command names containing dashes To: zsh-users@zsh.org, zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="0000000000003103ab05fac71ca7" X-Seq: 29069 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --0000000000003103ab05fac71ca7 Content-Type: text/plain; charset="UTF-8" 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 --0000000000003103ab05fac71ca7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

What I'= ;m running:

% cat /e= tc/debian_version
12.0

% dpkg -l zsh | grep ii =C2=A0
ii=C2=A0 zsh =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A05.9-4 =C2=A0 =C2=A0 =C2=A0 =C2=A0amd64 =C2=A0 =C2=A0 = =C2=A0 =C2=A0shell with lots of features

Hi,

I'= ve used zsh compctl since forever (late 90s or early 00s) but strangely nev= er run into this before. I realized today when I intended to make some compctl config for upda= te-alternatives that my completions where not triggered at all, it j= ust used my standard fallback completion (files) ... so a very stripped down simple example to show the problem:

This works fine:
~~~

zshprompt% <= span class=3D"gmail-hljs-built_in">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:

zshpr= ompt% with-dash
file2.txt myfile1.txt

~~~

As seen, my standard completion (listing current dire= ctory) is used rather than the one I added with compctl ... I also tried th= is with a totally clean zsh (no distribution or user configuration) and tha= t 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


--0000000000003103ab05fac71ca7--