git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: David Aguilar <davvid@gmail.com>,
	Felipe Contreras <felipe.contreras@gmail.com>
Cc: "Junio C Hamano" <gitster@pobox.com>,
	"Git Mailing List" <git@vger.kernel.org>,
	"Denton Liu" <liu.denton@gmail.com>,
	"SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH v3] contrib/completion: fix zsh completion regression from 59d85a2a05
Date: Tue, 01 Jun 2021 18:33:40 -0500	[thread overview]
Message-ID: <60b6c3d4d432b_4044208a6@natae.notmuch> (raw)
In-Reply-To: <CAJDDKr630n7=8FqsSRXpN7fNy9ZB8FOzO=LxvfHFVrMR1=L3_A@mail.gmail.com>

David Aguilar wrote:
> On Tue, Jun 1, 2021 at 12:15 PM Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
> > > @@ -261,7 +261,7 @@ __git_zsh_main ()
> > >
> > >               (( $+opt_args[--help] )) && command='help'
> > >
> > > -             words=( ${orig_words[@]} )
> > > +             words=( git ${orig_words[@]} )
> >
> > This is wrong. The current code is fine.

> Thanks for the detailed explanation.
> 
> Just so I'm understanding this correctly.. if this was instead..
> 
>     words=( git ${words[@]} )
> 
> (instead of orig_words like I mistakenly included in v3) would that be
> an improvement, no-op or would it be worse?

It would be an improvement, but it's orthogonal to the regression you
are trying to fix.

I would just fix the regression for v2.32, and then afterwards try to do
the improvement.

I have a testing framework for the zsh completion in my git-completion
project, so I would be much more confident about this change if all the
tests pass. Alas I have not yet merged any v2.32.0-rc* so it's not
straightforward to run the tests now.

> It sounds like additional changes are needed to make it properly
> support options between "git" and the sub-command name, hence the
> patch is fine as-is in v4, correct?

I mean there's git options, and git command options. I don't know how
many changes are needed to make all the interactions work correctly, but
I wouldn't have confidence in any of them so close to a release,
especially considering git.git doesn't have any zsh tests.

So yes, v4 is fine.

> Hopefully in the future it can be extended to cover eg. "git -c
> foo.bar -C some-dir <sub-command>" as well. Thanks for your patience.

That will work correctly on git-completion once I merge your v4 patch
(and v2.32).

-- 
Felipe Contreras

      reply	other threads:[~2021-06-01 23:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01 16:52 [PATCH v3] contrib/completion: fix zsh completion regression from 59d85a2a05 David Aguilar
2021-06-01 19:15 ` Felipe Contreras
2021-06-01 20:59   ` David Aguilar
2021-06-01 23:33     ` Felipe Contreras [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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60b6c3d4d432b_4044208a6@natae.notmuch \
    --to=felipe.contreras@gmail.com \
    --cc=davvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=liu.denton@gmail.com \
    --cc=szeder.dev@gmail.com \
    /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://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).