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

Re: [PATCH] Add help.autocorrect to enable/disable autocorrecting

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 31, 2008, 16:33 UTC
Message-ID
<7v1w05401m.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<vpqk5dxqlya.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
Show 11 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> It is off(0) by default, to avoid scaring people unless they asked to.
>> If set to a non-0 value, wait for that amount of deciseconds before
>> running the corrected command.
>
> Perhaps off should be -1 (or, say, anything negative), so that the
> value 0 can be used to mean "execute the corrected command without
> waiting".
>
> (not that I really care personnally, I'd probably keep it off anyway).

I do not want to suggest this because I do not think of a good way to implement it myself, but it would be very nice if this feature can be enabled by default for interactive session and disabled for scripts.

Well, actually I think I do ;-)
Perhaps have a bash alias that does:
	alias git="git --dwim"

only in interactive session (ensuring "only in interactive" is the responsibility of the end user), with the global option similar to the "--paginate" that "git" wrapper itself takes?

Previous: Matthieu MoyNext: Mikael Magnusson
Message 17 of 19 in “Remove calculation of the longest command name from where it is not used”
  1. Remove calculation of the longest command name from where it is not usedAlex Riesen, Aug 28, 2008
  2. git wrapper: DWIM mistyped commandsAlex Riesen, Aug 28, 2008
  3. Add help.autocorrect to enable/disable autocorrectingAlex Riesen, Aug 28, 2008
  4. Andreas EricssonAug 29, 2008
  5. Junio C HamanoSep 8, 2008
  6. Mikael MagnussonAug 29, 2008
  7. Alex RiesenAug 30, 2008
  8. Mikael MagnussonAug 30, 2008
  9. Alex RiesenAug 31, 2008
  10. Junio C HamanoAug 30, 2008
  11. Alex RiesenAug 30, 2008
  12. Reuse cmdname->len to store pre-calculated similarity indexesAlex Riesen, Aug 30, 2008
  13. Junio C HamanoAug 30, 2008
  14. git wrapper: DWIM mistyped commandsAlex Riesen, Aug 31, 2008
  15. Add help.autocorrect to enable/disable autocorrectingAlex Riesen, Aug 31, 2008
  16. Matthieu MoyAug 31, 2008
  17. Junio C HamanoAug 31, 2008
  18. Mikael MagnussonSep 1, 2008
  19. Felipe Carvalho OliveiraAug 30, 2008

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.