Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Remove redundancies from `git` completion



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