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

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



Suraj N. Kurapati wrote:
> On Wed 19 Oct 2011 01:26:24 PM PDT, Frank Terbeck wrote:
[...]
>> zstyle ':vcs_info:*+*:*' debug true
>
> Thank you!  I should have RTFM as that was stated explicitly in the
> Misc/vcs_info-examples file.  After seeing the debugging output, my
> problem seems to be that only the last hook function in my vimrc
> seems to be executed.  So 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

Regards, Frank



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