git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: No tab completion for git version?

From
Jeff King <peff@peff.net>
Date
Nov 27, 2019, 17:42 UTC
Message-ID
<20191127174219.GA12023@sigill.intra.peff.net>
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
Previous: ryenus
Message 2 of 2 in “No tab completion for git version?”
  1. ryenusNov 22, 2019
  2. Jeff KingNov 27, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.