zsh-workers
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: Eric Cook <llua@gmx.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [RFC/PATCH] completion: git: add fast mode
Date: Wed, 25 Nov 2020 16:34:05 -0600	[thread overview]
Message-ID: <CAMP44s3pt60n4kjMvLGQsq7++f5LBt4Zp5nWYzr5H=S7RQqwMA@mail.gmail.com> (raw)
In-Reply-To: <3205a2bc-42a2-6d9f-9746-6ac198aff66e@gmx.com>

On Wed, Nov 25, 2020 at 8:48 AM Eric Cook <llua@gmx.com> wrote:
>
> On 11/23/20 12:56 PM, Felipe Contreras wrote:
> > This patch is just to show how merging the gitfast/git zsh
> > wrapper/git-completion might look like.
>
> Would the overall end goal be to merge the feature set of the two
> completers or just allow the two to be used in tandem? The patch
> looks like the latter not the former and if so, is a precedent i
> would like zsh to not set personally.

I think the overall end goal would be to move as much as possible of
the completion to the Git project itself. For example; git commands
have the --git-completion-helper option, which throw something like:

  % git version --git-completion-helper
  --build-options --no-build-options

There is no _git_version() specific function in Git's bash completion,
and yet when you type "git version --<tab>" the options are completed
anyway.

This helps so that new commands get some automatic completion, even
when nothing specific for them is done in the completion script.

It has been discussed in the mailing list to add something similar for
zsh specific completion, so the descriptions are generated too, and
shorthand forms, perhaps with --git-completion-helper=zsh.

This is a lot of work, and it's unclear precisely how Zsh's official
completion could leverage it, but I think it should be doable.

As for the bulk of the code (e.g. __git_complete_revlist), I think the
end goal should be to borrow the way in which Git developers
themselves leverage the power of Git to generate completions, and use
that in the official completion, perhaps with a "fast-mode" zstyle.

There probably shouldn't be any need to source Git's bash completion
script in the end.

But *today*, the people that want a limble fast completion need to use
that script one way or the other.

I see no way around that.

Cheers.

-- 
Felipe Contreras



  reply	other threads:[~2020-11-25 22:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 17:56 Felipe Contreras
2020-11-25  0:19 ` Daniel Shahaf
2020-11-25  3:54   ` Felipe Contreras
2020-11-25 14:48 ` Eric Cook
2020-11-25 22:34   ` Felipe Contreras [this message]
2020-11-25 22:56     ` Eric Cook
2020-11-26  0:22       ` 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

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

  git send-email \
    --in-reply-to='CAMP44s3pt60n4kjMvLGQsq7++f5LBt4Zp5nWYzr5H=S7RQqwMA@mail.gmail.com' \
    --to=felipe.contreras@gmail.com \
    --cc=llua@gmx.com \
    --cc=zsh-workers@zsh.org \
    /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://git.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).