From: Patrick Steinhardt <ps@pks.im>
To: Vincent Mailhol <mailhol@kernel.org>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Philippe Blain <levraiphilippeblain@gmail.com>,
Ben Knoble <ben.knoble@gmail.com>
Subject: Re: [PATCH v3 2/4] completion: complete 'git history --empty' values
Date: Wed, 19 Aug 2026 13:13:28 +0200 [thread overview]
Message-ID: <aoWP2OHLMDmNBBBv@pks.im> (raw)
In-Reply-To: <20260813-history_autocompletion-v3-2-69eed1cea93a@kernel.org>
On Thu, Aug 13, 2026 at 09:05:03PM +0200, Vincent Mailhol wrote:
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 1727768487..7f3cabd595 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2169,6 +2169,15 @@ _git_history ()
>
> if ! __git_has_doubledash; then
> case "$cur" in
> + --empty=*)
> + case "$subcommand" in
> + drop|fixup)
> + __gitcomp "drop keep abort" "" \
> + "${cur##--empty=}"
> + ;;
> + esac
> + return
> + ;;
It would've been fine to just do this for every subcommand, I guess. But
this version works for me, too.
Patrick
next prev parent reply other threads:[~2026-08-19 11:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 19:56 [PATCH] completion: add 'git history' subcommands Vincent Mailhol
2026-08-05 6:19 ` Patrick Steinhardt
2026-08-05 11:56 ` D. Ben Knoble
2026-08-05 16:15 ` Junio C Hamano
2026-08-05 21:20 ` Vincent Mailhol
2026-08-06 5:18 ` Patrick Steinhardt
2026-08-13 19:05 ` [PATCH v3 0/4] completion: add support for 'git history' Vincent Mailhol
2026-08-13 19:05 ` [PATCH v3 1/4] completion: add 'git history' subcommands Vincent Mailhol
2026-08-19 11:13 ` Patrick Steinhardt
2026-08-13 19:05 ` [PATCH v3 2/4] completion: complete 'git history --empty' values Vincent Mailhol
2026-08-19 11:13 ` Patrick Steinhardt [this message]
2026-08-13 19:05 ` [PATCH v3 3/4] completion: complete 'git history --update-refs' values Vincent Mailhol
2026-08-13 19:05 ` [PATCH v3 4/4] completion: complete 'git history split' pathspecs Vincent Mailhol
2026-08-13 20:30 ` [PATCH v3 0/4] completion: add support for 'git history' Kristoffer Haugsbakk
2026-08-14 6:25 ` Vincent Mailhol
2026-08-14 7:50 ` Kristoffer Haugsbakk
2026-08-19 11:13 ` Patrick Steinhardt
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=aoWP2OHLMDmNBBBv@pks.im \
--to=ps@pks.im \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=levraiphilippeblain@gmail.com \
--cc=mailhol@kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox