Re: [TOY PATCH] git wrapper: show similar command names for an unknown command
- From
- Dirk Süsserott <newsletter@dirk.my1.cc>
- Date
- Jun 5, 2008, 20:59 UTC
- Message-ID
- <484853B1.80509@dirk.my1.cc>
- In-Reply-To
- <alpine.DEB.1.00.0806050747000.21190@racer>
Johannes Schindelin schrieb:
Show 23 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 > > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> > --- > This is just a toy, but might be useful to other people. > >
[snip]
Whow! This is really cool, especially for people that do not know the different commands by heart -- like me. I often know there's a command that's spelled somehow like X but I don't exactly remember. Your patch seems perfect for that situation. :-) Keen on seeing it in a future release. Thanks in advance. Did someone suggest it or was it your very own idea?
-- Dirk