zsh-users
 help / color / mirror / code / Atom feed
From: Yasuhiro KIMURA <yasu@utahime.org>
To: zsh-users@zsh.org
Subject: Re: Strange behavior about option completion of `git push`
Date: Fri, 18 Sep 2020 12:11:04 +0900 (JST)	[thread overview]
Message-ID: <20200918.121104.642676791521054636.yasu@utahime.org> (raw)
In-Reply-To: <CAH+w=7aHaWSKZAFeyA8EsWKgEf5xPpAK0A1SVOcHUZ2=oCZ+7g@mail.gmail.com> <94652-1600371379.844993@tOXe.J2fU.pIBE>

From: Bart Schaefer <schaefer@brasslantern.com>
Subject: Re: Strange behavior about option completion of `git push`
Date: Thu, 17 Sep 2020 11:05:43 -0700

> I think the difference is that --force-with-lease has a required
> argument, which differs from the other two --f options, whereas none
> of the --r completions has an argument.

Oh, I didn't notice it.

From: Oliver Kiddle <opk@zsh.org>
Subject: Re: Strange behavior about option completion of `git push`
Date: Thu, 17 Sep 2020 21:36:19 +0200

> This appears to be a bug in the zsh completion internals. The difference
> between --f and --r is that for --f, the options are added with more
> than one call to compadd because there's a mix of suffix characters
> required on those options.
> 
> Any further discussion on this line should probably go to -workers but a
> minimal function to reproduce the issue is as follows:
> 
>   compadd -M 'r:|.=*' one
>   compadd -M 'r:|-=*' - --follow-tags --force
>   compadd -M 'r:|-=*' - --force-with-lease
>   return 0
> 
> With _git_push the first of these compadd calls is from _ssh_hosts. The
> matching control options are needed. The latter two with - as a pivot
> but the first can use any character. The case with --r is equivalent to
> combining the latter two compadd calls into a single call.
> 
> Matching control is known to have some gnarly issues.

It seems too much for me to handle this issue. So I would like to
leave the investigation of it to someone familiar with the internals
of zsh completion.

---
Yasuhiro KIMURA


      reply	other threads:[~2020-09-18  3:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-17 17:22 Yasuhiro KIMURA
2020-09-17 18:05 ` Bart Schaefer
2020-09-17 19:36 ` Oliver Kiddle
2020-09-18  3:11   ` Yasuhiro KIMURA [this message]

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=20200918.121104.642676791521054636.yasu@utahime.org \
    --to=yasu@utahime.org \
    --cc=zsh-users@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).