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

Re: [Feature request] help.autocorrect suggestion with Y/N

From
Jeff King <peff@peff.net>
Date
Sep 8, 2015, 08:40 UTC
Message-ID
<20150908084035.GC2991@sigill.intra.peff.net>
In-Reply-To
<55EE9828.106@spacetrace.org>
On Tue, Sep 08, 2015 at 10:11:20AM +0200, rubenkram@spacetrace.org wrote:
Show 11 quoted lines
>  git: 'glone' is not a git command. See 'git --help'.
> 
>  Did you mean this?
> 	clone
> 
> It would be handsome if you could say "Yes" to this question so you
> don't have to manually correct your last command like:
> 
>  Did you mean this?
>         clone
>  [Y/n]

There is currently no way to ask, but you might want to check out help.autoCorrect:

  $ git config --global help.autoCorrect 10
  $ git glone ...
  WARNING: You called a Git command named 'gclone', which does not exist.
  Continuing under the assumption that you meant 'clone'
  in 1.0 seconds automatically...
You can set it to "-1" if you want no delay at all.

If you (or someone) wanted to add an interactive version, it would probably make sense to trigger it by setting help.autoCorrect to "ask".

-Peff
Previous: rubenkram@spacetrace.org
Message 2 of 2 in “[Feature request] help.autocorrect suggestion with Y/N”
  1. rubenkram@spacetrace.orgSep 8, 2015
  2. Jeff KingSep 8, 2015

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.