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

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

 



On Tue, Nov 23, 2010 at 7:49 PM, Tarek Ziadà <ziade.tarek@xxxxxxxxx> wrote:
> On Tue, Nov 23, 2010 at 1:40 PM, Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> wrote:
>> On Tue, Nov 23, 2010 at 7:23 PM, Tarek Ziadà <ziade.tarek@xxxxxxxxx> 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

There's another command that starts with "st": stripspace (it's a
lowlevel command by the way). It's going to be a lot more if you type
"git m" and expect all commands starting with 'm'. Personally I would
do "git help -a|grep st" in that case. Hmm.. "git apropos" could be a
good idea.

> That's what the tab completion does:
>
> $ git st<tab>
> stage  Âstash  Âstatus

And it does for tab _completion_ (notice stripspace is missing,
git-completion.sh only lists high level commands). The above case is
to help mistyping.
-- 
Duy
--
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]