From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Git mailing list" <git@vger.kernel.org>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Eric Sunshine" <sunshine@sunshineco.com>
Subject: Re: [PATCH 2/2] completion: simplify _git_notes
Date: Wed, 7 Mar 2018 02:08:43 +0100 [thread overview]
Message-ID: <20180307010843.3503-1-szeder.dev@gmail.com> (raw)
In-Reply-To: <xmqqd10g3jxb.fsf@gitster-ct.c.googlers.com>
> SZEDER Gábor <szeder.dev@gmail.com> writes:
>
> > There is a minor behaviour change here, though. This
> >
> > prune,*)
> > ;;
> >
> > case arm ensured that we don't list refs for 'git notes prune <TAB>',
> > because it doesn't accept them (and then we take our usual fallback and
> > let Bash complete filenames; yeah, 'git notes prune' doesn't accept
> > filenames either, but, as I said, that's our usual fallback when we
> > can't offer anything for completion).
> >
> > This patch removes that case arm, and refs will be offered for 'git
> > notes prune <TAB>'.
> >
> >> + *,--*)
> >> + __gitcomp_builtin notes_$subcommand
> >> ;;
> >> *)
> >> case "$prev" in
>
> I have this tentatively queued on the topic. Can we wrap the topic
> up and move it forward, instead of leaving it (and other topics)
> hanging around and causing conflicts with other topics in flight,
> please?
>
> Thanks.
>
>
> Subject: [PATCH] SQUASH???
>
> By Szeder <CAM0VKjmmF2t=B2s3rJoKmO3j6Bk5d6PEfCV==ONRGMcdUMLFpQ@mail.gmail.com>
> ---
> contrib/completion/git-completion.bash | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index ab80f4e6e8..5f7495cda3 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1836,6 +1836,11 @@ _git_notes ()
> add,--reedit-message=*|append,--reedit-message=*)
> __git_complete_refs --cur="${cur#*=}"
> ;;
> + prune,--*)
> + __gitcomp_builtin notes_prune
> + ;;
> + prune,*)
> + ;;
> *,--*)
> __gitcomp_builtin notes_$subcommand
> ;;
> --
> 2.16.2-345-g7e31236f65
>
That works fine, but this would work just as well and has one less
case arm:
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index ab80f4e6e8..038af63c1a 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1839,6 +1839,8 @@ _git_notes ()
*,--*)
__gitcomp_builtin notes_$subcommand
;;
+ prune,*)
+ ;;
*)
case "$prev" in
-m|-F)
next prev parent reply other threads:[~2018-03-07 1:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-03 9:23 [PATCH 0/2] nd/parseopt-completion fixups Nguyễn Thái Ngọc Duy
2018-03-03 9:23 ` [PATCH 1/2] completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate Nguyễn Thái Ngọc Duy
2018-03-03 9:34 ` Eric Sunshine
2018-03-06 10:22 ` Phillip Wood
2018-03-03 9:23 ` [PATCH 2/2] completion: simplify _git_notes Nguyễn Thái Ngọc Duy
2018-03-03 12:32 ` SZEDER Gábor
2018-03-03 13:09 ` SZEDER Gábor
2018-03-06 22:42 ` Junio C Hamano
2018-03-07 1:08 ` SZEDER Gábor [this message]
2018-03-07 18:51 ` Junio C Hamano
2018-03-07 1:05 ` [PATCH v2 0/4] nd/parseopt-completion fixups Nguyễn Thái Ngọc Duy
2018-03-07 1:05 ` [PATCH v2 1/4] completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate Nguyễn Thái Ngọc Duy
2018-03-07 1:05 ` [PATCH v2 2/4] completion: simplify _git_notes Nguyễn Thái Ngọc Duy
2018-03-07 1:05 ` [PATCH v2 3/4] completion: complete --{reuse,reedit}-message= for all notes subcmds Nguyễn Thái Ngọc Duy
2018-03-07 1:05 ` [PATCH v2 4/4] completion: more subcommands in _git_notes() Nguyễn Thái Ngọc Duy
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=20180307010843.3503-1-szeder.dev@gmail.com \
--to=szeder.dev@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=sunshine@sunshineco.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).