public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Alexander Kuleshov <kuleshovmail@gmail•com>
Cc: git@vger•kernel.org
Subject: Re: [PATCH] bash completion: allow git stash store options completion
Date: Tue, 13 Jan 2015 10:40:40 -0800	[thread overview]
Message-ID: <xmqq7fwqed7b.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <1421171612-12058-1-git-send-email-kuleshovmail@gmail.com> (Alexander Kuleshov's message of "Tue, 13 Jan 2015 23:53:32 +0600")

Alexander Kuleshov <kuleshovmail@gmail•com> writes:

> This patch adds bash completion for git stash 'store' subcommand
> which apperead at bd514cad (stash: introduce 'git stash store', 18 Jun 2013)
>
> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail•com>
> ---

Hmph.  The "create" and "store" subcommands are not end-user facing;
they are meant to be used in scripts.  I am not sure if we want to
complete them in the first place.  I know "create" already is in the
list of completion candidates, but I wonder if adding "store" is
making things worse.

I dunno.

>  contrib/completion/git-completion.bash | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index c21190d..7578266 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2375,7 +2375,7 @@ _git_show_branch ()
>  _git_stash ()
>  {
>  	local save_opts='--keep-index --no-keep-index --quiet --patch'
> -	local subcommands='save list show apply clear drop pop create branch'
> +	local subcommands='save list show apply clear drop pop create branch store'
>  	local subcommand="$(__git_find_on_cmdline "$subcommands")"
>  	if [ -z "$subcommand" ]; then
>  		case "$cur" in
> @@ -2402,6 +2402,9 @@ _git_stash ()
>  			__gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
>  					| sed -n -e 's/:.*//p')"
>  			;;
> +		store,--*)
> +			__gitcomp "--message --quiet"
> +			;;
>  		*)
>  			;;
>  		esac

  reply	other threads:[~2015-01-13 18:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 17:53 [PATCH] bash completion: allow git stash store options completion Alexander Kuleshov
2015-01-13 18:40 ` Junio C Hamano [this message]
2015-01-14 19:03   ` brian m. carlson
2015-01-14 20:06     ` Junio C Hamano

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=xmqq7fwqed7b.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=kuleshovmail@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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