Re: [PATCH 00/14] completion: a bunch of updates

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

 



On 29.10.20 18:16, Junio C Hamano wrote:
> Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:
> 
>> On Wed, Oct 28, 2020 at 3:09 AM Stefan Haller <lists@xxxxxxxxxxxxxxxx> wrote:
>>>
>>> I might not be the representative zsh user, but just as one data point:
>>> I have never downloaded the completion scripts from anywhere. I always
>>> use the one that comes with my "distro" (which is the Mac git installer,
>>> most of the time, which puts it in /usr/local/git/contrib/completion/).
>>> I symlink that to ~/.zfunc/_git.
> 
> That's one data point.
> 
>>> I don't think it makes a difference whether the scripts live in contrib
>>> or not. Bash completion is also in contrib, and yet it seems to be
>>> shipped and enabled by most distros, as far as I can tell.
>>
>> Apples and oranges.
>>
>> There is no default completion for git in bash, neither in bash, nor
>> in bash-completion, so if the distribution doesn't install the
>> completion in the right place
>> (/usr/share/bash-completion/completions/git), then the user would have
>> no git completion.
> 
> True, as far as I know.  https://github.com/scop/bash-completion does not
> seem to have an entry for "git" (/usr/share/bash-completion/completions/git
> however is locally there on my box---probably the corp IT folks installed
> it there), so what we ship in contrib/ is the most used (if not the only)
> implementation of bash completion script.
> 
>> On zsh the situation is different; zsh by default has a git completion
>> (/usr/share/zsh/functions/Completion/Unix/_git), and some might argue
>> it's more complete than git's zsh completion,
> 
> How is that completion script developed, maintained and distributed?
> 
> By "by default" I believe you mean that it gets installed when you
> install zsh automatically.  Is the situation different on macOS land
> (which I can believe, unfortunately)?

It's the same on Mac; I get zsh's builtin git completion when I don't
install ours.

> Stefan?  If at least some people argue what comes with zsh by
> default is more complete than the one we have in contrib/, what led
> you choose to "symlink" the less complete one to use it instead?

I'm not sure I can answer the question which one is more complete. Ours
is certainly complete enough for my daily use, but this might not mean much.

The reason why I chose ours over the one that comes with zsh is that
ours is *way* faster. If I type "git log origin/mas<tab>", with zsh's
completion it takes between one and two seconds to auto-complete this to
"origin/master". With ours it's instantaneous.

> Another question (this is for Felipe).  Is
> 
>    https://github.com/ohmyzsh/ohmyzsh/blob/master/plugins/gitfast
> 
> the one that comes with zsh by default, or is it something else
> (perhaps it is the go-to version for those who are not satisfied
> with the version that comes with zsh by default???)?
> 
> Thanks.
> 



[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