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

Re: bug: unexpected output for "git st" + suggestion

From
TZTarek Ziadé <ziade.tarek@gmail.com>
Date
Nov 23, 2010, 12:49 UTC
Message-ID
<AANLkTinj3ryChGKV8c6fHSD=aickmz0TMos4k0RYGKvo@mail.gmail.com>
In-Reply-To
<AANLkTinFMn4V3c3yV6j72eqj5=v4jW7Uh3fmNDOyYjnT@mail.gmail.com>
On Tue, Nov 23, 2010 at 1:40 PM, Nguyen Thai Ngoc Duy <pclouds@gmail.com> wrote:
Show 21 quoted lines
> On Tue, Nov 23, 2010 at 7:23 PM, Tarek Ziadé <ziade.tarek@gmail.com> 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
>
> It's heuristics, based on the assumption that you mistype a command by
> a letter or two.
> It gives helpful suggestions most of the time, but
> you can't expect it to be always right, especially when "st" is not a
> mistyping. "git --help" does show "status" though so I guess it's ok.

Yes, I understood this, but given the list of base commands git comes with, if "st" gives "stage" and "stash", it would find it logical to give also "status", by listing commands that starts with 'st'

st stage stash status

That's what the tab completion does:

$ git st<tab> stage stash status

Cheers Tarek

> --
> Duy
>
-- 
Tarek Ziadé | http://ziade.org
Previous: Nguyen Thai Ngoc DuyNext: Nguyen Thai Ngoc Duy
Message 3 of 27 in “bug: unexpected output for "git st" + suggestion”
  1. Tarek ZiadéNov 23, 2010
  2. Nguyen Thai Ngoc DuyNov 23, 2010
  3. Tarek ZiadéNov 23, 2010
  4. Nguyen Thai Ngoc DuyNov 23, 2010
  5. Tarek ZiadéNov 23, 2010
  6. Nguyen Thai Ngoc DuyNov 23, 2010
  7. Andreas SchwabNov 23, 2010
  8. Sylvain RabotNov 23, 2010
  9. Erik Faye-LundNov 23, 2010
  10. Tarek ZiadéNov 23, 2010
  11. Erik Faye-LundNov 23, 2010
  12. Tarek ZiadéNov 23, 2010
  13. help: always suggest common-cmds if prefix of cmdErik Faye-Lund, Nov 23, 2010
  14. Junio C HamanoNov 24, 2010
  15. Erik Faye-LundNov 24, 2010
  16. help: always suggest common-cmds if prefix of cmdErik Faye-Lund, Nov 24, 2010
  17. Junio C HamanoNov 25, 2010
  18. Erik Faye-LundNov 25, 2010
  19. help: always suggest common-cmds if prefix of cmdErik Faye-Lund, Nov 26, 2010
  20. Junio C HamanoNov 27, 2010
  21. Erik Faye-LundNov 29, 2010
  22. Jonathan NiederNov 29, 2010
  23. Erik Faye-LundNov 29, 2010
  24. Junio C HamanoNov 29, 2010
  25. Erik Faye-LundDec 1, 2010
  26. help.autoCorrect prefix selection considered a bit dangerousÆvar Arnfjörð Bjarmason, Nov 19, 2018
  27. Junio C HamanoNov 20, 2018

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.