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

Re: [PATCH] help: prompt user to run corrected command on typo

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 19, 2026, 16:37 UTC
Message-ID
<xmqq5x3elc49.fsf@gitster.g>
In-Reply-To
<6a34dc40.2c570c9e.381c97.203f@mx.google.com>
Jishnu C K <jishnuck26@gmail.com> writes:
> You're right that `help.autocorrect=prompt` exists and is similar.
> Our change differs in two ways:
>
> 1. No configuration needed. The existing prompt mode requires the user
I do not particularly see it as an advantage.
Show 11 quoted lines
> 2. The prompt includes the original arguments. `help.autocorrect=prompt`
>    shows only:
>
>      Run 'checkout' instead [y/N]?
>
>    Our prompt shows the full corrected invocation:
>
>      Did you mean 'git checkout neo'? [y/N]
>
>    This lets the user confirm exactly what will run, including their
>    original arguments, before pressing 'y'.

This may be an improvement, but is there a reason why such a change must be done as a parallel and unrelated (re)implementation and not as an incrementa improvement to the code that implements the existing feature?

Previous: Justin ToblerNext: Jishnu C K
Message 5 of 8 in “help: prompt user to run corrected command on typo”
  1. help: prompt user to run corrected command on typocalicomills, Jun 18, 2026
  2. Justin ToblerJun 18, 2026
  3. Jishnu C KJun 19, 2026
  4. Justin ToblerJun 19, 2026
  5. Junio C HamanoJun 19, 2026
  6. help: include arguments in autocorrect=prompt messageJishnu C K, Jun 19, 2026
  7. Jishnu C KJun 23, 2026
  8. Junio C HamanoJun 23, 2026

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.