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:-all-" 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 -- 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