From: Wincent Colaiuta Date: Fri, 06 Jun 2008 14:18:09 GMT Subject: Re: [TOY PATCH] git wrapper: show similar command names for an unknown command Message-ID: In-Reply-To: <200806061415.27507.robin.rosenberg.lists@dewire.com> El 6/6/2008, a las 14:15, Robin Rosenberg escribió: > torsdagen den 5 juni 2008 08.48.40 skrev Johannes Schindelin: >> >> 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 All true, but most of those issues would go away if just _one_ guess, the best guess, was shown. Cheers, Wincent