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

Re: [TOY PATCH] git wrapper: show similar command names for an unknown command

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Jun 6, 2008, 12:15 UTC
Message-ID
<200806061415.27507.robin.rosenberg.lists@dewire.com>
In-Reply-To
<alpine.DEB.1.00.0806050747000.21190@racer>
torsdagen den 5 juni 2008 08.48.40 skrev Johannes Schindelin:
Show 19 quoted lines
> 
> This patch introduces a modified Damerau-Levenshtein algorithm into
> Git's code base, and uses it with the following penalties to show some
> similar commands when an unknown command was encountered:
> 
> 	swap = 0, insertion = 1, substitution = 2, deletion = 4
> 
> A typical output would now look like this:
> 
> 	$ git reabse
> 	git: 'reabse' is not a git-command. See 'git --help'.
> 
> 	Did you mean one of these?
> 		rebase
> 		merge-base
> 		rev-parse
> 		remote
> 		rerere
> 
Sorry about my negativity here..
Doesn't this confuse more than it helps? Most people do not need to know about rerere, rev-parse or merge-base so it is very unlikely they actually meant those. That might be an issue of tuning than general principles, but I have my doubts. It won't hint that there are wildly different variants of rebase, which ctually might be much more important to know than rerere, not will it tell svn users that git revert isn't even close to svn revert.
Completion or git gui is a much better tool for solving this isssue
Some ancient LISP had a DWIM (do what I mean) and there might be a reason it has not become ery popular.
Despite not being useful, it's still cool :)
-- robin
Previous: Johannes SchindelinNext: Wincent Colaiuta
Message 19 of 28 in “git wrapper: show similar command names for an unknown command”
  1. git wrapper: show similar command names for an unknown commandJohannes Schindelin, Jun 5, 2008
  2. Add subcommand "help" to the list of most commonly used subcommandsTeemu Likonen, Jun 5, 2008
  3. Johannes SchindelinJun 5, 2008
  4. Teemu LikonenJun 5, 2008
  5. 1/2 Add subcommand "help" to the list of most commonly used subcommandsTeemu Likonen, Jun 5, 2008
  6. 2/2 More informative short description for git-help.txtTeemu Likonen, Jun 5, 2008
  7. Johannes SchindelinJun 5, 2008
  8. Sverre RabbelierJun 5, 2008
  9. Teemu LikonenJun 5, 2008
  10. Junio C HamanoJun 5, 2008
  11. Pieter de BieJun 5, 2008
  12. Teemu LikonenJun 5, 2008
  13. Junio C HamanoJun 5, 2008
  14. David SymondsJun 6, 2008
  15. Wincent ColaiutaJun 5, 2008
  16. Sverre RabbelierJun 5, 2008
  17. Dirk SüsserottJun 5, 2008
  18. Johannes SchindelinJun 5, 2008
  19. Robin RosenbergJun 6, 2008
  20. Wincent ColaiutaJun 6, 2008
  21. Alex RiesenJun 7, 2008
  22. Johannes SchindelinJun 7, 2008
  23. Alex RiesenJun 7, 2008
  24. Junio C HamanoJun 7, 2008
  25. Johannes SchindelinJun 8, 2008
  26. Dirk SüsserottJun 8, 2008
  27. Junio C HamanoJun 8, 2008
  28. Johannes SchindelinJun 8, 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.