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

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

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> Felipe Contreras <felipe.contreras@xxxxxxxxx> writes:
>
>> 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)?
> ...

Web searching for "zsh git autocompletion" gave a few interesting insights.

 - https://medium.com/@oliverspryn/adding-git-completion-to-zsh-60f3b0e7ffbc
   was the first hit, which is about how to use what we ship in contrib/

 - https://stackoverflow.com/questions/24513873/ which was near the top
   had these gems.

      https://stackoverflow.com/a/58517668
      Actually, ZSH does know how to do git completion out of the box, but
      you need to turn on the completion feature itself (which from the
      steps you described I guess you haven't done)

   and

      https://stackoverflow.com/a/63894520
      Turns out the problem for me wass that when installing git via
      homebrew, git installs its own zsh shell extension which is
      considerably less complete/capable than the default that
      oh-my-szh installs. Find out what versions your git install is
      and then remove the zsh autocompletions. Mine were here and
      deleted thusly:

	rm -rf /usr/local/Cellar/git/2.28.0/share/zsh/

The "knows out of the box" in https://stackoverflow.com/a/58517668
is matches your "zsh by default has".

> so why would
> distribution maintainers chose the one in 'contrib' (an unofficial
> contributed script) over the official one? Indeed they don't, at least
> on Arch Linux.

You're right.  They would certainly not, and the situation is quite
different from bash completion where we seem to be the authoritative
implementation.

This leads me in a totally different direction.

We are making life worse for the zsh users by shipping our own
version, aren't we?  If we didn't ship our own completion script for
them, the user did not have to remove the one "which is considerably
less complete/capable".  Perhaps we are misleading users with our
version that has an implicit "came from those who know Git the best
in the world" label that gives it more authenticity than it
deserves.  A good zsh autocompletion would need to be written and
reviewed by those who know zsh completion well.  They also need to
know Git somewhat, but the expertise on the former would be a lot
more important, I would think.

But as you said in
<CAMP44s3wqxTmgQpMgk2cM33EvtwrvvXYv4_90GKGmHb8yJHAKg@xxxxxxxxxxxxxx>

    The answer is obvious: the set of zsh users and the set of git
    developers don't overlap.

this community is not equipped to give good reviews and improvement
suggestions on zsh matters to your patches.  And I do not have a
feeling that the situation would change soon.

Do your recent 29-patch improvements not just fill the "gap" but
surpass the one that comes by default with zsh?  I have this nagging
feeling that the effort to make the autocompletion better for Git
users who use zsh may be better made by you ("git blame" tells me that
you seem to be the only one who's invested heavily in the script,
unfortunately) joining forces with those who develop and maintain the
autocompletion that comes by default with zsh.  We may also want to
have a tombstone in contrib/completion/ to redirect the users to the
default version and away from our "less complete/capable" one.

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