From: Marlon Richert <marlon.richert@gmail.com>
To: Mikael Magnusson <mikachu@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Remove redundancies from `git` completion
Date: Tue, 31 Aug 2021 08:52:02 +0300 [thread overview]
Message-ID: <CAHLkEDu=hm77q1idtFg5PhPeh9FmxrvPOgrutz-Eaz0UBM_g9Q@mail.gmail.com> (raw)
In-Reply-To: <CAHYJk3Qf5W2TY0u03bS7wUzR9Q8iXtwmpDRG8o8nTRCaBgMT1g@mail.gmail.com>
On Mon, Aug 30, 2021 at 3:42 PM Mikael Magnusson <mikachu@gmail.com> wrote:
>
> On 8/30/21, Marlon Richert <marlon.richert@gmail.com> wrote:
> > On Mon, Aug 30, 2021 at 2:41 PM Mikael Magnusson <mikachu@gmail.com> wrote:
> >>
> >> On 8/30/21, Marlon Richert <marlon.richert@gmail.com> wrote:
> >> > By the way: Why is there a `(( $+functions[_git-XXX] )) ||` statement
> >> > in front of each function inside Completion/Unix/Command/_git ? Can
> >> > those be removed?
> >>
> >> They are there so that you can override their implementation easily.
> >
> > Is that documented somewhere?
>
> Not explicitly, afaik.
I see this pattern is used in several completer functions.Should it be
documented?
>
> > And for purposes of overriding, wouldn't it be cleaner to simply
> > supply all sub-functions as separate #autoload files?
>
> I don't think anyone is interested in maintaining 285 separate
> completer files for git :).
If you count the #autoload line, it would be the exact same number of
lines of code, but you wouldn't need to duplicate the function name
for each function in an `if` statement. That would be taken care of
automatically by `autoload`.
next prev parent reply other threads:[~2021-08-31 5:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-30 11:17 Marlon Richert
2021-08-30 11:41 ` Mikael Magnusson
2021-08-30 12:34 ` Marlon Richert
2021-08-30 12:42 ` Mikael Magnusson
2021-08-31 5:52 ` Marlon Richert [this message]
2021-09-01 14:03 ` Daniel Shahaf
2021-09-01 18:22 ` Bart Schaefer
2021-09-02 6:17 ` Marlon Richert
2021-09-02 20:51 ` Oliver Kiddle
2021-09-02 20:54 ` Bart Schaefer
2021-09-02 21:17 ` Oliver Kiddle
2021-09-01 13:56 ` Daniel Shahaf
2021-09-02 8:57 ` Marlon Richert
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='CAHLkEDu=hm77q1idtFg5PhPeh9FmxrvPOgrutz-Eaz0UBM_g9Q@mail.gmail.com' \
--to=marlon.richert@gmail.com \
--cc=mikachu@gmail.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).