git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: ryenus <ryenus@gmail.com>
Cc: Git mailing list <git@vger.kernel.org>
Subject: Re: No tab completion for git version?
Date: Wed, 27 Nov 2019 12:42:19 -0500	[thread overview]
Message-ID: <20191127174219.GA12023@sigill.intra.peff.net> (raw)
In-Reply-To: <CAKkAvaywyh2bY4tHX2XvugM9V8NBUfG-hM_TyK-Ob7Pzm+6xBA@mail.gmail.com>

On Fri, Nov 22, 2019 at 06:19:27PM +0800, ryenus wrote:

> Tab completion works for `git --version`, but not `git version`.
> Of course, it would work with a custom executable script git-version on PATH.
> 
> Interestingly, it works even if the git-version script is an empty file.

It's because git-version isn't mentioned in "git help -a", from which we
generate the completion list. That comes from command-list.h, which in
turn is generated from command-list.txt, which doesn't mention
git-version as a command. And we can't add it there until it has a
manpage (since we pull the oneline description from the synopsis).

It might not be a bad thing to have a manpage. For example, the
--build-options is undocumented.

cmd_version() is also weirdly in help.c, not builtin/help.c, which might
be worth fixing.

-Peff

      reply	other threads:[~2019-11-27 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-22 10:19 No tab completion for git version? ryenus
2019-11-27 17:42 ` Jeff King [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=20191127174219.GA12023@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=ryenus@gmail.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.
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).