zsh-users
 help / color / mirror / code / Atom feed
From: "Suraj N. Kurapati" <sunaku@gmail.com>
To: Frank Terbeck <ft@bewatermyfriend.org>
Cc: zsh-users@zsh.org
Subject: Re: Misc/vcs_info-examples - "git-st" snippet broken?
Date: Wed, 19 Oct 2011 11:37:50 -0700	[thread overview]
Message-ID: <20111019113750.3c96d1fa@gmail.com> (raw)
In-Reply-To: <87pqhshmmw.fsf@ft.bewatermyfriend.org>

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      reply	other threads:[~2011-10-19 18:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-19 10:44 Suraj N. Kurapati
2011-10-19 11:26 ` Frank Terbeck
2011-10-19 18:08   ` Suraj N. Kurapati
2011-10-19 18:17     ` Frank Terbeck
2011-10-19 18:37       ` Suraj N. Kurapati [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111019113750.3c96d1fa@gmail.com \
    --to=sunaku@gmail.com \
    --cc=ft@bewatermyfriend.org \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).