git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Keeping <john@keeping.me.uk>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, "SZEDER Gábor" <szeder@ira.uka.de>
Subject: Re: [PATCH 1/2] completion: handle unstuck form of base git options
Date: Fri, 28 Jun 2013 09:20:17 +0100	[thread overview]
Message-ID: <20130628082017.GE2232@serenity.lan> (raw)
In-Reply-To: <adafd1a0c0d7d059d215d9fd1ea68579525efe6e.1371900318.git.john@keeping.me.uk>

Hi Junio, I don't think you've picked this up.  Are you expecting a
re-roll or did it just get lost in the noise?

On Sat, Jun 22, 2013 at 12:25:17PM +0100, John Keeping wrote:
> git-completion.bash's parsing of the command name relies on everything
> preceding it starting with '-' unless it is the "-c" option.  This
> allows users to use the stuck form of "--work-tree=<path>" and
> "--namespace=<path>" but not the unstuck forms "--work-tree <path>" and
> "--namespace <path>".  Fix this.
> 
> Similarly, the completion only handles the stuck form "--git-dir=<path>"
> and not "--git-dir <path>", so fix this as well.
> 
> Signed-off-by: John Keeping <john@keeping.me.uk>
> ---
>  contrib/completion/git-completion.bash | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 6c3bafe..8fbf941 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2492,9 +2492,10 @@ __git_main ()
>  		i="${words[c]}"
>  		case "$i" in
>  		--git-dir=*) __git_dir="${i#--git-dir=}" ;;
> +		--git-dir)   ((c++)) ; __git_dir="${words[c]}" ;;
>  		--bare)      __git_dir="." ;;
>  		--help) command="help"; break ;;
> -		-c) c=$((++c)) ;;
> +		-c|--work-tree|--namespace) ((c++)) ;;
>  		-*) ;;
>  		*) command="$i"; break ;;
>  		esac
> -- 
> 1.8.3.1.676.gaae6535
> 

      parent reply	other threads:[~2013-06-28  8:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-22 11:25 [PATCH 1/2] completion: handle unstuck form of base git options John Keeping
2013-06-22 11:25 ` [PATCH 2/2] completion: learn about --man-path John Keeping
2013-06-30 11:41   ` SZEDER Gábor
2013-06-30 22:59     ` Junio C Hamano
2013-06-22 12:30 ` [PATCH 1/2] completion: handle unstuck form of base git options SZEDER Gábor
2013-06-22 12:35   ` SZEDER Gábor
2013-06-28  8:20 ` John Keeping [this message]

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=20130628082017.GE2232@serenity.lan \
    --to=john@keeping.me.uk \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=szeder@ira.uka.de \
    /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).