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

Re: [PATCH v2] completion: complete "git -<TAB>" with short options

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 27, 2025, 21:59 UTC
Message-ID
<xmqqo6onjfwl.fsf@gitster.g>
In-Reply-To
<aSf+yrfJo8dRIkSo@szeder.dev>
SZEDER Gábor <szeder.dev@gmail.com> writes:
Show 7 quoted lines
> know what those short options are good for.  E.g. I just learned from
> this patch that the main git command accepts -p and -P options, but I
> have no idea what they are doing.)
>
> So overall I'm somewhat negative on this patch and in general on the
> direction it takes us, but if we do want to go in this direction, then
> it will definitely need more justification than this.
Ah, yes, I totally forgot earlier discussions we had long ago, e.g.,
  https://lore.kernel.org/git/20070205024704.GB12917@spearce.org/

Completing potential values for a single letter short option is one thihng, but completing single letter short options themselves, unless the completion script can offer a short-help somehow, e.g.,

    $ git -<TAB><TAB>
    -C (chdir there before running the command)
    -p (enable pager)
    ...
I agree that it would not be of much use.
Previous: SZEDER GáborNext: Junio C Hamano
Message 6 of 7 in “Add completion for short options”
  1. Add completion for short optionsWiktor Mis via GitGitGadget, Nov 25, 2025
  2. Junio C HamanoNov 25, 2025
  3. completion: complete "git -<TAB>" with short optionsWiktor Mis via GitGitGadget, Nov 26, 2025
  4. Junio C HamanoNov 26, 2025
  5. SZEDER GáborNov 27, 2025
  6. Junio C HamanoNov 27, 2025
  7. Junio C HamanoDec 7, 2025

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.