zsh-users
 help / color / mirror / code / Atom feed
From: Fredrik Ax <fredrik@axnet.nu>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Fredrik Ax <fredrik@axnet.nu>, zsh-users@zsh.org, zsh-workers@zsh.org
Subject: Re: completion ( compctl ) does not trigger for command names containing dashes
Date: Thu, 4 May 2023 12:36:45 +0200	[thread overview]
Message-ID: <CANPa6YCnuq+=KHtusLs2yDg3xCpdZKpNuE8fQR7u+eCyABr5Uw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7YoDS+4-RNbrfDD=B6+QJydARkOBNx7J58e6KoLtgzQqw@mail.gmail.com>

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

> Den ons 3 maj 2023 kl 19:13 skrev Bart Schaefer <schaefer@brasslantern.com
>:
>
> On Wed, May 3, 2023 at 2:59 AM Fredrik Ax <fredrik@axnet.nu> wrote:
> >
> > 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

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

  parent reply	other threads:[~2023-05-04 10:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-03  9:59 Fredrik Ax
2023-05-03 17:13 ` Bart Schaefer
2023-05-04  7:52   ` Fredrik Ax
2023-05-04 10:36   ` Fredrik Ax [this message]
2023-05-04 14:44     ` Bart Schaefer
2023-05-07  9:41       ` 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='CANPa6YCnuq+=KHtusLs2yDg3xCpdZKpNuE8fQR7u+eCyABr5Uw@mail.gmail.com' \
    --to=fredrik@axnet.nu \
    --cc=schaefer@brasslantern.com \
    --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).