From: Kirill Kolyshkin <kolyshkin@gmail.com>
To: Matheus Tavares Bernardino <matheus.bernardino@usp.br>
Cc: git <git@vger.kernel.org>, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH] completion: add diff --color-moved[-ws]
Date: Fri, 21 Feb 2020 12:15:08 -0800 [thread overview]
Message-ID: <CAGmPdrwDUzk7iHYOrjPNrCJkhuJT==v5L-d_hY5gXxMLf+gFDQ@mail.gmail.com> (raw)
In-Reply-To: <CAHd-oW61vuuvs25iOkLJ--Wv39ZXFF87_-pV=vX=oTibRinn5Q@mail.gmail.com>
On Thu, 20 Feb 2020 at 15:30, Matheus Tavares Bernardino
<matheus.bernardino@usp.br> wrote:
>
> On Thu, Feb 20, 2020 at 6:47 PM Kir Kolyshkin <kolyshkin@gmail.com> wrote:
> >
> > These options are available since git v2.15, but somehow
> > eluded from the completion script.
> >
> > Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
> > ---
> > contrib/completion/git-completion.bash | 15 +++++++++++++++
> > 1 file changed, 15 insertions(+)
> >
> > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> > index 1aac5a56c0..43cb6a312d 100644
> > --- a/contrib/completion/git-completion.bash
> > +++ b/contrib/completion/git-completion.bash
> > @@ -1487,9 +1487,16 @@ __git_diff_algorithms="myers minimal patience histogram"
> >
> > __git_diff_submodule_formats="diff log short"
> >
> > +__git_color_moved_opts="no default plain blocks zebra dimmed-zebra"
> > +
> > +__git_color_moved_ws_opts="no ignore-space-at-eol ignore-all-space
> > + allow-indentation-change"
>
> I think "ignore-space-change" is missing in the above list. Besides
> that, the patch LGTM.
Thanks for catching this, I'll send v2.
>
> As a side-note: when we have an option with an already filled value,
> e.g. `--color-moved-ws=allow-identation-change,`, although it accepts
> more values as a comma separated list, pressing <tab><tab> won't
> suggest others. But I think the helper functions in
> git-completion.bash don't provide an easy way to do that right now
That's right -- as much as I want to make --key=val[,val ...] work,
there is no (easy?) way to do that :(
> (and there might even be a bug in bash-completion involving this [1]).
> So, I think the patch is good as it is (just adding the missing item
> to that list) :)
>
> [1]: https://github.com/scop/bash-completion/issues/240
next prev parent reply other threads:[~2020-02-21 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-20 21:46 [PATCH] completion: add diff --color-moved[-ws] Kir Kolyshkin
2020-02-20 23:30 ` Matheus Tavares Bernardino
2020-02-21 0:11 ` Matheus Tavares Bernardino
2020-02-21 20:15 ` Kirill Kolyshkin [this message]
2020-02-21 20:15 ` [PATCH v2] " Kir Kolyshkin
2020-02-23 5:05 ` Matheus Tavares
2020-02-24 4:41 ` Kirill Kolyshkin
2020-02-24 6:02 ` Matheus Tavares Bernardino
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='CAGmPdrwDUzk7iHYOrjPNrCJkhuJT==v5L-d_hY5gXxMLf+gFDQ@mail.gmail.com' \
--to=kolyshkin@gmail.com \
--cc=git@vger.kernel.org \
--cc=matheus.bernardino@usp.br \
--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.
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).