git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: "Felipe Contreras" <felipe.contreras@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	"Stefan Haller" <lists@haller-berlin.de>,
	Git <git@vger.kernel.org>, "SZEDER Gábor" <szeder.dev@gmail.com>,
	"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH 00/14] completion: a bunch of updates
Date: Tue, 3 Nov 2020 16:37:14 -0600	[thread overview]
Message-ID: <CAMP44s3w1uBgupT-K0FbR7Zjtp6+z0PfdbkGvnFX0SpA9qF1FQ@mail.gmail.com> (raw)
In-Reply-To: <X6CQpfuhRkAwmMou@pug.qqx.org>

On Mon, Nov 2, 2020 at 5:05 PM Aaron Schrab <aaron@schrab.com> wrote:

> The option that you consider to be invalid is definitely *my* preferred
> option. That Homebrew's git package installs the completion in a way
> that overrides that from the zsh package was a source of continual
> annoyance for me until I put in a long-term workaround for that (I had
> just been removing the symlink every time I noticed that it had been
> created by a new install of the git package).

You are probably a minority.

Just put the location of your desired completion in front of your fpath

  fpath=(/usr/share/zsh/functions/Completion/Unix $fpath)

> While the completion provided by git.git may be faster, the one from zsh
> is fast enough on the repositories that I generally work with.

There's no such thing as "fast enough" for most Git developers.

> At least
> with my configuration and the completion code currently shipped by
> Homobrew's git package there are at least a couple of things that seem
> to be quite broken.

If they are still broken in this version:
https://github.com/felipec/git-completion

Feel free to open an issue report.

> The one that generally caused me to notice that the wrong completion
> code was being used is that it doesn't provide completion for creating
> local branches to based off of remote ones; I'd previously thought that
> was just a missing feature, but looking into it a bit more now it looks
> like that **should** happen as long as I don't set
> GIT_COMPLETION_CHECKOUT_NO_GUESS=1.

That was a bug because somebody added a new function to the Bash
script and forgot to add it to the Zsh script.

I've sent the fix:

https://lore.kernel.org/git/20201028020712.442623-14-felipe.contreras@gmail.com/

> The other thing that seems to not work with the completion from git.git
> is completion of single-dash options. Although that may be more of a
> missing feature rather than something that's broken. Since there isn't
> any description for long options, I'd guess there wouldn't be for short
> options either; in which case there isn't really any point to trying to
> offer completion for those. But, having additional descriptions for
> options is one of my favorite features of zsh completion.

That's a feature request.

It may work at some point, but it would require a lot of work. In the
meantime you can simply use the default Zsh completion.

The point of the Zsh completion is to offer everything the Bash
completion offers. Which is clearly fine for most people, since that's
the completion most people use.

Cheers.

-- 
Felipe Contreras

  parent reply	other threads:[~2020-11-03 22:37 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 22:30 [PATCH 00/14] completion: a bunch of updates Felipe Contreras
2019-06-21 22:30 ` [PATCH 01/14] completion: zsh: fix __gitcomp_direct() Felipe Contreras
2019-06-22 15:03   ` Felipe Contreras
2019-06-21 22:30 ` [PATCH 02/14] completion: zsh: fix for directories with spaces Felipe Contreras
2019-06-21 22:30 ` [PATCH 03/14] completion: remove zsh hack Felipe Contreras
2019-06-21 22:30 ` [PATCH 04/14] completion: zsh: improve main function selection Felipe Contreras
2019-06-21 22:30 ` [PATCH 05/14] completion: prompt: fix color for Zsh Felipe Contreras
2019-06-21 22:30 ` [PATCH 06/14] completion: bash: cleanup cygwin check Felipe Contreras
2019-06-21 22:31 ` [PATCH 07/14] completion: zsh: update installation instructions Felipe Contreras
2019-06-21 22:31 ` [PATCH 08/14] completion: bash: remove old compat wrappers Felipe Contreras
2019-06-21 22:31 ` [PATCH 09/14] completion: bash: remove zsh wrapper Felipe Contreras
2019-06-21 22:31 ` [PATCH 10/14] completion: zsh: trivial cleanups Felipe Contreras
2019-06-21 22:31 ` [PATCH 11/14] test: completion: tests for __gitcomp regression Felipe Contreras
2019-07-03 17:38   ` Junio C Hamano
2019-07-03 17:49   ` SZEDER Gábor
2019-06-21 22:31 ` [PATCH 12/14] test: completion: use global config Felipe Contreras
2019-07-03 17:22   ` Junio C Hamano
2019-06-21 22:31 ` [PATCH 13/14] completion: add default options Felipe Contreras
2019-06-22  3:01   ` Duy Nguyen
2019-06-22  4:36     ` Felipe Contreras
2019-06-24 17:22     ` Junio C Hamano
2019-06-25  1:38       ` Felipe Contreras
2019-06-25  3:32         ` Duy Nguyen
2019-06-21 22:31 ` [PATCH 14/14] completion: add default merge strategies Felipe Contreras
2019-06-24 17:23   ` Junio C Hamano
2019-06-25  1:11     ` Felipe Contreras
2019-06-25  1:43       ` Junio C Hamano
2019-07-03 17:14       ` SZEDER Gábor
2019-07-03 17:50 ` [PATCH 00/14] completion: a bunch of updates Junio C Hamano
2019-07-03 19:06   ` SZEDER Gábor
2020-10-25  3:51     ` Felipe Contreras
2020-10-25  3:46   ` Felipe Contreras
2020-10-27 20:23     ` Junio C Hamano
2020-10-27 22:19       ` Felipe Contreras
2020-10-27 23:32         ` Junio C Hamano
2020-10-28  0:06           ` Felipe Contreras
2020-10-28  9:09             ` Stefan Haller
2020-10-28 16:31               ` Felipe Contreras
2020-10-28 17:34                 ` Stefan Haller
2020-10-29 17:16                 ` Junio C Hamano
2020-10-29 17:27                   ` Junio C Hamano
2020-11-02 20:18                     ` Felipe Contreras
2020-11-03  1:49                       ` Junio C Hamano
2020-11-04  0:09                         ` Felipe Contreras
2020-11-04 18:08                           ` Junio C Hamano
2020-11-05  1:09                             ` Felipe Contreras
2020-11-05 22:09                               ` Junio C Hamano
2020-10-30  8:01                   ` Stefan Haller
2020-10-30 17:19                     ` Junio C Hamano
2020-11-02 20:29                       ` Felipe Contreras
2020-11-02 23:05                         ` Aaron Schrab
2020-11-03  1:35                           ` Junio C Hamano
2020-11-03 23:46                             ` Felipe Contreras
2020-11-03 22:37                           ` Felipe Contreras [this message]
2020-11-03  9:59                       ` Stefan Haller
2020-11-03 17:12                         ` Junio C Hamano
2020-11-03 20:07                           ` Stefan Haller
2020-11-02 19:18                   ` Felipe Contreras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAMP44s3w1uBgupT-K0FbR7Zjtp6+z0PfdbkGvnFX0SpA9qF1FQ@mail.gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lists@haller-berlin.de \
    --cc=pclouds@gmail.com \
    --cc=szeder.dev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).