Git development
 help / color / mirror / Atom feed
From: Jishnu C K <jishnuck26@gmail.com>
To: Justin Tobler <jltobler@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] help: prompt user to run corrected command on typo
Date: Thu, 18 Jun 2026 23:05:52 -0700 (PDT)	[thread overview]
Message-ID: <6a34dc40.2c570c9e.381c97.203f@mx.google.com> (raw)
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

  reply	other threads:[~2026-06-19  6:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 14:26 [PATCH] help: prompt user to run corrected command on typo calicomills
2026-06-18 17:48 ` Justin Tobler
2026-06-19  6:05   ` Jishnu C K [this message]
2026-06-19 16:24     ` Justin Tobler
2026-06-19 16:37     ` Junio C Hamano
2026-06-19 17:04   ` [PATCH v2] help: include arguments in autocorrect=prompt message Jishnu C K

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6a34dc40.2c570c9e.381c97.203f@mx.google.com \
    --to=jishnuck26@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jltobler@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox