From: "SZEDER Gábor" <szeder@fzi.de>
To: John Keeping <john@keeping.me.uk>, Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] completion: learn about --man-path
Date: Sun, 30 Jun 2013 13:41:06 +0200 [thread overview]
Message-ID: <20130630114106.GE2294@goldbirke> (raw)
In-Reply-To: <bc83f64cf17851022e0344b3eb693beda1bdd8b6.1371900318.git.john@keeping.me.uk>
Hi,
On Sat, Jun 22, 2013 at 12:25:18PM +0100, John Keeping wrote:
> Signed-off-by: John Keeping <john@keeping.me.uk>
> ---
> contrib/completion/git-completion.bash | 2 ++
> t/t9902-completion.sh | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
> index 8fbf941..c3290af 100644
> --- a/contrib/completion/git-completion.bash
> +++ b/contrib/completion/git-completion.bash
> @@ -2513,11 +2513,13 @@ __git_main ()
> --exec-path
> --exec-path=
> --html-path
> + --man-path
> --info-path
> --work-tree=
> --namespace=
> --no-replace-objects
> --help
> + -c
There are a couple of issues with this '-c' here:
- We normally offer only --long-options in the completion script.
- The log message doesn't mention it.
- And finally the most important: it will never be offered for
completion. This is the condition of this case branch:
case "$cur" in
--*) __gitcomp "
i.e. this case branch is executed only when the current word on the
command line begins with '--', but then '-c' will never match.
Without the '-c' part it's "obviously correct" and together with patch
1/2 is
Acked-by: SZEDER Gábor <szeder@ira.uka.de>
> "
> ;;
> *) __git_compute_porcelain_commands
> diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh
> index 81a1657..14d605a 100755
> --- a/t/t9902-completion.sh
> +++ b/t/t9902-completion.sh
> @@ -231,6 +231,7 @@ test_expect_success 'double dash "git" itself' '
> --exec-path Z
> --exec-path=
> --html-path Z
> + --man-path Z
> --info-path Z
> --work-tree=
> --namespace=
> --
> 1.8.3.1.676.gaae6535
>
>
next prev parent reply other threads:[~2013-06-30 11:41 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 [this message]
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
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=20130630114106.GE2294@goldbirke \
--to=szeder@fzi.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=john@keeping.me.uk \
/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