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?