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=unavailable autolearn_force=no version=3.4.4 Received: (qmail 4075 invoked from network); 4 May 2023 10:39:32 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 4 May 2023 10:39:32 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1683196772; b=rDs4rnqHX3H/e96ZvezbD5d6xoU7OX6458XJRoBVyqqCNJBN92wvSdlXzLKd7jriFgZUv+WMWE XBMgwOIO0K6s977FgZAnKjJ3VY9EluJkVozzUZaDjtdqYWzzXBNgxmetDdR3+ZjpTVx2uQzIV4 XyjY43iJS630OVsKaWMyfwfLh0U5I7/v3X1XCXMHUyf0z+b5r6+ri27xmSCQ4DxV6vYmaewDWF f5EY1mpxvVORVJAuJ31EvUPJhJzdBlYVO12k7fP8rkKK7NV63dARerztPemq1sRi8KoMlf9ScL HVD3Sd7G1+qvCHHd4Ria3tyn84O374XYaF8axHSQ5EdC2Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vk1-f181.google.com) smtp.remote-ip=209.85.221.181; 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=1683196772; bh=0igk7JZ45ClkbRUmog7vkEGUSIgNGXgLIbz2VfLwqgM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature; b=a9MMj+OQhplfZEPuP3eok1WQ3ZUe4IDzlHQZGVAZX/+Z2zLjmP3cRe1Ag+KRc/GbWpE4wvMKZ7 dbM1dj0LQCHqVa8Eu9YerCf1iDB7PueltZgvfQqc4QofcnJB7A37t5pq74F9Je5HWk2/koZ8XP 4cEHTw9XNz7alzIe20dvmukfMAUdv3WMV8KxIo80RXt1SlJskiBtS+bKbE/s6nVn5M5CEivzJr fFqTQ7sP9jtpDyrLaFfZlCBDV2BB+j2B5I6AD03e56p9Ka0stxdOwIaJc86SpxGUr3yVunvsD0 7EEnHjjcGurAFQmfNy4qSGl8ifZ6vAqkRKbQZFqU81JJAw==; 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:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=baQniMQTiOo3mOKxzbtJusmBWDAqqoCRF4Vh9BAbKfY=; b=UN6m4468ffJyg9pTKFQ3EpnJeG 8kdtmQi6+NpdRIlXhKvBJStB/Z3/8GpTlm6Idy6/gtfvV6YT4PzWlymk5pDrq4ZEH903JZbtDUiTz MUVTxr7VLbH8vgrGuN86f8NI9aVVLkX/veqypGuWuDtVRTphni7MbuL9mSk+Z2wDEiNu56rs+Q88r WOisNGFeteqx+Grfg0ZMesfh1aEox+5qe87ZcUH9v5sJKNbK57WoLN8YwWCZg8U7J0n9lsZvQhh4S +zFcN21ze50o3DokmwZYQ/Z3Ff3yD7kaJaNLx+FzaJQ/wET5V6rdFy2BBH+goonDPvKsP6vXfaMSf uFVnlpMw==; Received: by zero.zsh.org with local id 1puWN2-0003q1-JZ; Thu, 04 May 2023 10:39:32 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vk1-f181.google.com) smtp.remote-ip=209.85.221.181; dmarc=none header.from=axnet.nu; arc=none Received: from mail-vk1-f181.google.com ([209.85.221.181]:59893) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1puWKX-0002OE-Gh; Thu, 04 May 2023 10:36:58 +0000 Received: by mail-vk1-f181.google.com with SMTP id 71dfb90a1353d-44fcbe08ae2so100294e0c.3; Thu, 04 May 2023 03:36:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683196616; x=1685788616; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=baQniMQTiOo3mOKxzbtJusmBWDAqqoCRF4Vh9BAbKfY=; b=UQ/AdOm3in0yXb8egyOOmZulsgkAAcofaXcMgcxWORpjPc28bqpNZrqpzK7fx19bJ3 w2RYKcLQsn1wLUMmsZJyTn3IUiiC6OQDhLSrakLnwVcektgllTSLj5XbKok1qoWFjbeX E9Jcoj/cnzggVfKAGS3Dp67GBr/mjgMgl4l1Gjxtd34obBlFA6BTC+eyTFZrzDyS8iLj D69HN1AAg3hO07IYhKZj12B5MXP/MnooS2goUKosBDDdxJy7QM1j41BMDId3z2emmN6X 5o4BA5kUChFQsP8BcBRT3W4u1X/QP2t6m2uGf+p/rx1+Di9kuD2V8yivsTNqQRU6gpef HkXw== X-Gm-Message-State: AC+VfDyFt9yYhsOxSQGiEts5C5M+/IcY3PwYdMZNyMFSeDizdyVARNfi /0T/y7MDiTdhkmf9NQs2e/NcNzH09BW9pV2ED24= X-Google-Smtp-Source: ACHHUZ65y+eXx1bnss3p9gQ0nrweQKFI6GQeI+r2PnK+vxrreWRCH4xGWBle81vAI1C/XXpGQ4UXaykCL4M/D6mgpOA= X-Received: by 2002:a1f:ea45:0:b0:43c:290c:25e8 with SMTP id i66-20020a1fea45000000b0043c290c25e8mr7930069vkh.6.1683196616383; Thu, 04 May 2023 03:36:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fredrik Ax Date: Thu, 4 May 2023 12:36:45 +0200 Message-ID: Subject: Re: completion ( compctl ) does not trigger for command names containing dashes To: Bart Schaefer Cc: Fredrik Ax , zsh-users@zsh.org, zsh-workers@zsh.org Content-Type: multipart/alternative; boundary="00000000000068227f05fadbc0ae" X-Seq: 51711 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: --00000000000068227f05fadbc0ae Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > Den ons 3 maj 2023 kl 19:13 skrev Bart Schaefer : > > On Wed, May 3, 2023 at 2:59=E2=80=AFAM Fredrik Ax wrot= e: > > > > zshprompt% compctl -k '(arg1 arg2 arg3)' with-dash > > > > # typing 'with-dash ' and hitting [Tab] once: > > zshprompt% with-dash > > file2.txt myfile1.txt > > This dates back to the tokenization of hyphens to fix bugs in [a-z] > types of patterns. The ancient code in compctl is using the raw > command string and therefore looking for completions for > $'with\233-dash' rather than 'with-dash'. > > See if this (attached) fixes it without breaking anything else. Thanks! I made a quilt patch of this for the debian zsh_5.9-4 source package, rebuilt and installed it ... it seems to be working fine. No build or install issues, commands-with-dashes-in-the-name are now matched by the compctl rules ... looking good. Will keep running it for a while to see if I get anything else breaking by it. Can you give some pointers of which areas might get affected by this change, what to look for? Once, I'm satisfied it works well without breaking other stuff, how do I best submit this for upstream inclusion? Again, thanks in advance /frax --00000000000068227f05fadbc0ae Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> Den ons 3 maj 2023 kl 19:13 skrev Bart Schaefer <schaefer@brasslantern.com>:
<= div dir=3D"ltr" class=3D"gmail_attr">>
> On Wed, May 3, 2023 at 2= :59=E2=80=AFAM Fredrik Ax <fredrik@axnet.nu> wrote:
> >
> > zshprompt% compctl -k '(arg1 arg2 arg3)= ' with-dash
> >
> > # typing 'with-dash ' and= hitting [Tab] once:
> > z= shprompt% with-dash
> > file2.txt=C2=A0 =C2=A0 myfile1.txt
>
> This = dates back to the tokenization of hyphens to fix bugs in [a-z]
> types of patterns.=C2=A0 The ancient code in compct= l is using the raw
> command string and therefore looking for complet= ions for
> $'with\233-dash' rathe= r than 'with-dash'.
>
>=C2=A0 See if this (attached) fixes it without brea= king anything else.

Thanks!

I made a quilt p= atch of this for the debian zsh_5.9-4 source package, rebuilt and installed= it ... it seems to be working fine. No build or install issues, commands-w= ith-dashes-in-the-name are now matched by the compctl rules ... looking goo= d.

Will keep running it for a while = to see if I get anything else breaking by it.
Can you give some pointers of which a= reas might get affected by this change, what to look for?

Once, I'm satisfi= ed it works well without breaking other stuff, how do I best submit this fo= r upstream inclusion?

Again, thanks = in advance
/frax
--00000000000068227f05fadbc0ae--