git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] On error, do not list all commands, but point to --help option.

From
Wincent Colaiuta <win@wincent.com>
Date
Oct 21, 2007, 08:58 UTC
Message-ID
<ED3FFB7A-861F-47E4-97EA-D7A05552FC2C@wincent.com>
In-Reply-To
<20071021020653.GA14735@spearce.org>
El 21/10/2007, a las 4:06, Shawn O. Pearce escribió:
Show 18 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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?

   Unknown command: 'upsh': did you mean 'push'?
   Type 'git help' for usage.

Here's just one of many articles introducing the shortest-edit idea, as popularized by Google:

   <http://norvig.com/spell-correct.html>
What do you think?

Cheers, Wincent

Previous: Yin PingNext: Andreas Ericsson
Message 9 of 16 in “On error, do not list all commands, but point to --help option.”
  1. On error, do not list all commands, but point to --help option.Jari Aalto, Oct 20, 2007
  2. Johannes SchindelinOct 20, 2007
  3. Jari AaltoOct 20, 2007
  4. Johannes SchindelinOct 20, 2007
  5. Shawn O. PearceOct 21, 2007
  6. Jeff KingOct 21, 2007
  7. Shawn O. PearceOct 21, 2007
  8. Yin PingOct 21, 2007
  9. Wincent ColaiutaOct 21, 2007
  10. Andreas EricssonOct 21, 2007
  11. Jan HudecOct 21, 2007
  12. Andreas EricssonOct 21, 2007
  13. Salikh ZakirovOct 24, 2007
  14. On error, do not list all commands, but point to --help optionJari Aalto, Oct 20, 2007
  15. Shawn O. PearceOct 21, 2007
  16. Jan HudecOct 21, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.