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

Re: Misc/vcs_info-examples - "git-st" snippet broken?



On Wed 19 Oct 2011 08:17:11 PM PDT, Frank Terbeck wrote:
> Suraj N. Kurapati wrote:
> > does hook registration really override?
> >
> > .zshrc:
> >
> >     zstyle ':vcs_info:git*+set-message:*' hooks git-untracked
> >     +vi-git-untracked(){}
> >
> >     zstyle ':vcs_info:git*+set-message:*' hooks git-st function
> >     +vi-git-st() {}
> >
> >     zstyle ':vcs_info:git*+set-message:*' hooks git-remotebranch
> >     function +vi-git-remotebranch() {}
> >
> >     zstyle ':vcs_info:git*+set-message:*' hooks foobar function
> >     +vi-foobar() {echo 'foobar'}
>
> `hooks' is a list style. I don't think there is a way to add items
> to a list style in a given context, without looking it up first...
>
> So, try:
>
> zstyle ':vcs_info:git*+set-message:*' hooks git-untracked git-st \
> git-remotebranch foobar

Yay!  That solved it, thanks.  :)

Please add this caveat to the Misc/vcs_info-examples file because I
just copied and pasted from there expecting things to "Just Work".

-- 
Computer programmers do it byte by byte.

Attachment: signature.asc
Description: PGP signature



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