Re: [TOY PATCH] git wrapper: show similar command names for an unknown command
From: Wincent Colaiuta <hidden>
Date: 2016-06-15 22:44:42
El 6/6/2008, a las 14:15, Robin Rosenberg escribió:
torsdagen den 5 juni 2008 08.48.40 skrev Johannes Schindelin:quoted
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 rerereSorry 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