From: Ramkumar Ramachandra <artagnon@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: Git List <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] completion: add completer for status
Date: Fri, 28 Jun 2013 18:50:02 +0530 [thread overview]
Message-ID: <CALkWK0=pyzcx-rB9gjRecoD1MFkHrSdYwLurD8y805O3FwT4Cg@mail.gmail.com> (raw)
In-Reply-To: <20130628112631.GC16562@goldbirke>
SZEDER Gábor wrote:
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 912fb988..b68024c6 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -1697,6 +1697,8 @@ _git_stage ()
>
> _git_status ()
> {
> + __git_has_doubledash && return
> +
This line makes absolutely no sense to me. When the case statement
fails to match anything (which it will, when a double-dash is
present), we'll use the __git_complete_index_file which is superior to
returning and falling back to the dumb zsh file listing, no? As a
result, without that line,
$ git status -- foo<TAB>
will complete fine when foo* isn't necessarily a file in the
filesystem, but something that our ls-files returns, no?
> case "$cur" in
> --untracked-files=*)
> __gitcomp "no normal all" "" "${cur##--untracked-files=}"
> @@ -1718,7 +1720,7 @@ _git_status ()
> return
> ;;
> esac
> - __git_complete_index_file
> + __git_complete_index_file "--with-tree=HEAD --cached --deleted"
Might as well go all the way with "--cached --deleted --unmerged
--others" no? What is the point of --with-tree=HEAD?
Thanks.
next prev parent reply other threads:[~2013-06-28 13:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 17:22 [PATCH] completion: add completer for status Ramkumar Ramachandra
2013-06-24 17:28 ` Ramkumar Ramachandra
2013-06-28 10:29 ` SZEDER Gábor
2013-06-28 10:56 ` SZEDER Gábor
2013-06-28 11:26 ` SZEDER Gábor
2013-06-28 13:20 ` Ramkumar Ramachandra [this message]
2013-06-28 14:03 ` Ramkumar Ramachandra
2013-06-30 11:00 ` SZEDER Gábor
2013-06-28 14:04 ` SZEDER Gábor
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='CALkWK0=pyzcx-rB9gjRecoD1MFkHrSdYwLurD8y805O3FwT4Cg@mail.gmail.com' \
--to=artagnon@gmail.com \
--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).