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

Re: PATCH: _git (large)



On 9/27/07, Clint Adams <clint@xxxxxxx> wrote:

===================================================================
> RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
> retrieving revision 1.26
> diff -u -r1.26 _git
> --- Completion/Unix/Command/_git        25 Sep 2007 18:58:16 -0000      1.26
> +++ Completion/Unix/Command/_git        27 Sep 2007 11:29:36 -0000
> @@ -2676,6 +2676,12 @@
>
>  (( $+functions[__git_tag_ids] )) ||
>  __git_tag_ids () {
> +  local -a refs
> +
> +  refs=(${${(f)"$(_call_program tag_ids git ls-remote --tags ./. 2>/dev/null)"}%$'\t'*})
> +  __git_command_successful || return
> +
> +  _wanted tag_id expl 'tag object hash' compadd - $refs
>  }

__git_tags already does all this for you (through
__git_heads_or_tags).  I'd use __git_tags instead of this.

  nikolai



Messages sorted by: Reverse Date, Date, Thread, Author