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

help.autoCorrect prefix selection considered a bit dangerous

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 19, 2018, 20:35 UTC
Message-ID
<87y39oztzf.fsf@evledraar.gmail.com>
In-Reply-To
<1290787239-4508-1-git-send-email-kusmabite@gmail.com>

Replying to this blast from the past: https://public-inbox.org/git/1290787239-4508-1-git-send-email-kusmabite@gmail.com/

I apparently like to live dangerously and have help.autoCorrect enabled. I just had:

    git puss
Auto-corrected to:
    git push
When I meant:
    git pull

(For those wondering how I could have mistyped that, "l" and "s" are right next to each other on a Dvorak layout).

As seen in the E-Mail from 2010 this intentional, i.e. "pull" is pruned since the "pu" prefix isn't matched, but "pus" is. This was meant to correct e.g. "git st" to "git status".

I don't have time to poke at this now, but wonder if:
 1) The correction facility shouldn't at least have a list of "this does
    stuff over the wire" commands and would then use a more conservative
    estimate.
 2) Whether we can do better with typo detection. E.g. add commands like
    "pull" to the list if we have a long enough prefix for them, and if
    the number of characters entered matches the number of characters in
    another command.
Previous: Erik Faye-LundNext: Junio C Hamano
Message 26 of 27 in “bug: unexpected output for "git st" + suggestion”
  1. Tarek ZiadéNov 23, 2010
  2. Nguyen Thai Ngoc DuyNov 23, 2010
  3. Tarek ZiadéNov 23, 2010
  4. Nguyen Thai Ngoc DuyNov 23, 2010
  5. Tarek ZiadéNov 23, 2010
  6. Nguyen Thai Ngoc DuyNov 23, 2010
  7. Andreas SchwabNov 23, 2010
  8. Sylvain RabotNov 23, 2010
  9. Erik Faye-LundNov 23, 2010
  10. Tarek ZiadéNov 23, 2010
  11. Erik Faye-LundNov 23, 2010
  12. Tarek ZiadéNov 23, 2010
  13. help: always suggest common-cmds if prefix of cmdErik Faye-Lund, Nov 23, 2010
  14. Junio C HamanoNov 24, 2010
  15. Erik Faye-LundNov 24, 2010
  16. help: always suggest common-cmds if prefix of cmdErik Faye-Lund, Nov 24, 2010
  17. Junio C HamanoNov 25, 2010
  18. Erik Faye-LundNov 25, 2010
  19. help: always suggest common-cmds if prefix of cmdErik Faye-Lund, Nov 26, 2010
  20. Junio C HamanoNov 27, 2010
  21. Erik Faye-LundNov 29, 2010
  22. Jonathan NiederNov 29, 2010
  23. Erik Faye-LundNov 29, 2010
  24. Junio C HamanoNov 29, 2010
  25. Erik Faye-LundDec 1, 2010
  26. help.autoCorrect prefix selection considered a bit dangerousÆvar Arnfjörð Bjarmason, Nov 19, 2018
  27. Junio C HamanoNov 20, 2018

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.