From: Andreas Ericsson Date: Sun, 21 Oct 2007 12:42:25 GMT Subject: Re: [PATCH] On error, do not list all commands, but point to --help option. Message-ID: <471B4931.5040102@op5.se> In-Reply-To: Wincent Colaiuta wrote: > El 21/10/2007, a las 4:06, Shawn O. Pearce escribió: > >> Johannes Schindelin wrote: >>>>> On Sat, 20 Oct 2007, Jari Aalto wrote: >>>>> >>>>>> - commented out call to list_common_cmds_help() >>> >>> Well, I'm almost sure of the opposite. One of the big results of the >>> Git >>> Survey was that git is still not user-friendly enough. Your patch would >>> only make this issue worse. >> >> Actually I think Jari's patch helps for the reason originally >> stated in the message (less output when you make a small typo). >> Though I agree that the commented out code should just be removed. >> >> I actually had to do `git config alias.upsh push` just to keep >> myself from screaming every time I made a small typo and Git gave >> me a screenful of "helpful reminders". > > If you want to go really user friendly, how about a check against the > list of known commands using a shortest-edit distance algorithm? > http://en.wikipedia.org/wiki/Levenshtein_distance Implementing the algorithm doesn't seem terribly difficult. -- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231