git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matheus Tavares Bernardino <matheus.bernardino@usp.br>
To: Kir Kolyshkin <kolyshkin@gmail.com>
Cc: git <git@vger.kernel.org>, "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: Re: [PATCH] completion: add diff --color-moved[-ws]
Date: Thu, 20 Feb 2020 20:30:08 -0300	[thread overview]
Message-ID: <CAHd-oW61vuuvs25iOkLJ--Wv39ZXFF87_-pV=vX=oTibRinn5Q@mail.gmail.com> (raw)
In-Reply-To: <20200220214647.451064-1-kolyshkin@gmail.com>

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.

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
(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

  reply	other threads:[~2020-02-20 23:30 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 [this message]
2020-02-21  0:11   ` Matheus Tavares Bernardino
2020-02-21 20:15   ` Kirill Kolyshkin
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

  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='CAHd-oW61vuuvs25iOkLJ--Wv39ZXFF87_-pV=vX=oTibRinn5Q@mail.gmail.com' \
    --to=matheus.bernardino@usp.br \
    --cc=git@vger.kernel.org \
    --cc=kolyshkin@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).