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
Jishnu C K <jishnuck26@gmail.com>
Date
Jun 19, 2026, 06:05 UTC
Message-ID
<6a34dc40.2c570c9e.381c97.203f@mx.google.com>
In-Reply-To
<ajQuqTB580gqNP8D@denethor>
On Thu, Jun 18, 2026, Justin Tobler wrote:
> Isn't this already possible via setting `help.autoCorrect=prompt` in the
> config?
Thank you for the review.

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
   to explicitly set `help.autocorrect=prompt`. Most users are unaware
   of this option, so they see a suggestion and must retype the full
   command manually. Our change makes the interactive prompt the
   default behaviour when stdin and stderr are a terminal.
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'.

If the consensus is that the default should remain non-interactive, we are happy to rework this as an improvement to the existing `autocorrect=prompt` mode (showing args in the prompt) with documentation updates to make the option more discoverable.

-- 
Jishnu C K
Previous: Justin ToblerNext: Justin Tobler
Message 3 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.