On Tue, Nov 23, 2010 at 2:22 PM, Erik Faye-Lund <kusmabite@xxxxxxxxx> wrote: > On Tue, Nov 23, 2010 at 1:23 PM, Tarek Ziadé <ziade.tarek@xxxxxxxxx> wrote: >> Hello, >> >> I am new to Git and I tried to run "git st" >> >> I have found one small bug: "status" is not listed in the help screen >> Git displays in that case. >> >> $ git st >> git: 'st' is not a git command. See 'git --help'. >> >> Did you mean one of these? >> reset >> stage >> stash >> > > This isn't strictly speaking a bug. Git uses Levenshtein distance > (http://en.wikipedia.org/wiki/Levenshtein_distance) to figure out what > to suggest. If any command has a sLevenshtein distance of less than 6 > (given our coefficients), then all commands with that distance is > suggested. But perhaps we should do something different > > But perhaps we could do better. We have some commands that are > considered more "important", ie the ones listed when doing "git help" > without "--all". "status" is one of these. Perhaps these commands > should always be included if they are below the Levenshtein distance > threshold or something? > Oh, interesting ! Levenshtein is great for typos but highly depends on the fact that the word I am entering has about the same length as the command I am looking for. When I typed "st" I was thinking about an alias/shortcut. So the question would be: is "st" a common alias in the git community for the "status" command ? If the answer is yes, and if there are other common aliases used out there, I would suggest keeping the Levenshtein distance as it is now, but complete the list of suggestions by using a "common aliases mapper." Cheers Tarek -- Tarek Ziadé | http://ziade.org -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html