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

vcs_info git quilt: gen-applied-string hook



$ zsh -f
% autoload -Uz vcs_info
% precmd() { vcs_info ; print -rl - $vcs_info_msg_0_ $vcs_info_msg_1_ $vcs_info_msg_2_ }
% zstyle :vcs_info:\* use-quilt true
% zstyle :vcs_info:\* actionformats %m
% zstyle :vcs_info:\* formats %Q
% zstyle :vcs_info:git+gen-applied-string:\* hooks f
% +vi-f() { hook_com[applied-string]="+vi-f: Called with ${(q-)1}"; ret=1  }

The above hook gets called both by the git backend (e.g., during a rebase) and
by the 'addon' quilt mode.

I can discriminate the two cases via (( $+funcstack[(r)VCS_INFO_quilt] )).
My question is just whether the hook should be called by 'addon' quilt
mode in the first place.  Should quilt mode look up hooks under the
context :vcs_info:git.quilt-addon+gen-applied-string:* instead?
                     ^^^^^^^^^^^^

Cheers,

Daniel



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