From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26014 invoked by alias); 19 Oct 2011 18:19:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16525 Received: (qmail 27242 invoked from network); 19 Oct 2011 18:19:39 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh-users@zsh.org Subject: Re: Misc/vcs_info-examples - "git-st" snippet broken? In-Reply-To: <20111019110812.76266dae@gmail.com> (Suraj N. Kurapati's message of "Wed, 19 Oct 2011 11:08:12 -0700") References: <20111019034402.4d73538a@gmail.com> <87r529i5nj.fsf@ft.bewatermyfriend.org> <20111019110812.76266dae@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) Date: Wed, 19 Oct 2011 20:17:11 +0200 Message-ID: <87pqhshmmw.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Df-Sender: NDMwNDQ0 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