Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Remove redundancies from `git` completion
- X-seq: zsh-workers 49331
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Marlon Richert <marlon.richert@xxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Remove redundancies from `git` completion
- Date: Mon, 30 Aug 2021 13:41:17 +0200
- Archived-at: <https://zsh.org/workers/49331>
- In-reply-to: <CAHLkEDt9=VdVFqvvwUfXb8HBO_uxZAnaS7f_gtBTSHy_XLMWsg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAHLkEDt9=VdVFqvvwUfXb8HBO_uxZAnaS7f_gtBTSHy_XLMWsg@mail.gmail.com>
On 8/30/21, Marlon Richert <marlon.richert@xxxxxxxxx> wrote:
> In _git-show, remove calls to __git_commits and __git_tags.
> Rationale: 'commits' and 'tags' are already added by __git_trees.
> Adding them twice makes `zstyle ... tag-order` give unexpected
> results.
>
> In __git_recent_commits, remove the line that adds 'heads'.
> Rationale: The completion for most subcommands already adds
> 'heads-local' and 'heads-remote'. Adding an additional 'heads' inside
> __git_recent_commits results in heads being listed twice in two
> separate groups.
>
>
> 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.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author