From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29524 invoked by alias); 19 Oct 2011 18:08:33 -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: 16524 Received: (qmail 20489 invoked from network); 19 Oct 2011 18:08:21 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=M1KBAsX0PxiU8W0+lMFS/dECRVwbA13NxPOfeloX9Io=; b=Fy03Jzc6cdkoy2A0eBWexOr6m9slCAvr/6TEwwdfSJqUmJm+c4Blvk+7NK0/AMvVNW lylOiTaLRqtt5Y9xqOuWRtqIko/8XiGXz8kVuq5QNpsfqV2cjhna4/2X3PYKSGUAqcM6 /uDvYdO03qwpjKKJ+k6QSZx023F1MnhJw/OF0= Date: Wed, 19 Oct 2011 11:08:12 -0700 From: "Suraj N. Kurapati" To: Frank Terbeck Cc: zsh-users@zsh.org Subject: Re: Misc/vcs_info-examples - "git-st" snippet broken? Message-ID: <20111019110812.76266dae@gmail.com> In-Reply-To: <87r529i5nj.fsf@ft.bewatermyfriend.org> References: <20111019034402.4d73538a@gmail.com> <87r529i5nj.fsf@ft.bewatermyfriend.org> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/0VRtDkJBR5d0.23=lZFbC0c"; protocol="application/pgp-signature" --Sig_/0VRtDkJBR5d0.23=lZFbC0c Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed 19 Oct 2011 01:26:24 PM PDT, Frank Terbeck wrote: > Suraj N. Kurapati wrote: > > I'm using zsh 4.3.12 (x86_64-unknown-linux-gnu) and have added > > the "git-st" snippet shown below to my .zshrc file from the ZSH > > git repository's Misc/vcs_info-examples file. The problem is > > that +vi-git-st() isn't being called automatically by > > vcs_info(). > > Did you try turning on debugging within `vcs_info'? That should > show you which hooks are being processed and which functions are > considered. > > 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'} output: +!master git:rebase-i ~/.oh-my-zsh> pwd /home/sunny/.oh-my-zsh VCS_INFO_hook: running hook: "start-up" VCS_INFO_hook: current context: ":vcs_info:-init-+start-up:default:-all= -" VCS_INFO_hook: static context: ":vcs_info-static_hooks:start-up" + static hooks: + context hooks: VCS_INFO_hook: running hook: "pre-get-data" VCS_INFO_hook: current context: ":vcs_info:git+pre-get-data:default:-al= l-" VCS_INFO_hook: static context: ":vcs_info-static_hooks:pre-get-data" + static hooks: + context hooks: VCS_INFO_hook: running hook: "post-backend" VCS_INFO_hook: current context: ":vcs_info:git+post-backend:default:.oh= -my-zsh" VCS_INFO_hook: static context: ":vcs_info-static_hooks:post-backend" + static hooks: + context hooks: VCS_INFO_hook: running hook: "pre-addon-quilt" VCS_INFO_hook: current context: ":vcs_info:git+pre-addon-quilt:default:= .oh-my-zsh" VCS_INFO_hook: static context: ":vcs_info-static_hooks:pre-addon-quilt" + static hooks: + context hooks: VCS_INFO_hook: running hook: "set-message" VCS_INFO_hook: current context: ":vcs_info:git+set-message:default:.oh-= my-zsh" VCS_INFO_hook: static context: ":vcs_info-static_hooks:set-message" + static hooks: + context hooks: foobar + Running function: "+vi-foobar" foobar --=20 And it should be the law: If you use the word `paradigm' without knowing what the dictionary says it means, you go to jail. No exceptions. -- David Jones --Sig_/0VRtDkJBR5d0.23=lZFbC0c Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6fEgwACgkQmV9O7RYnKMchcwCgnMRPDmUA4LKsXQFWOyvBhu9h XmAAnRxBsUjNe6l96uBYY17ZiWn0gdh4 =G4Md -----END PGP SIGNATURE----- --Sig_/0VRtDkJBR5d0.23=lZFbC0c--