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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Schindelin schrieb:
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@xxxxxx>
---
	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

--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux