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

Use of vcs_info



I don't fully understand how best to use vcs_info.

My first question is:  what's with the weird $vcs_info_msg_#_ variable 
names? (Why not an array?)

But, beyond that, my big question is: Is there a way to access the 
vcs_comm variable that's sprinkled throughout the VCS_Info functions 
directory?  My guess is that the easiest thing for me to do would be to 
simply remove the 'local -Ax vcs_comm' line in vcs_info, but everything 
else is so well-organized that I figured I must just be missing some way 
to get that variable exported.

The most helpful page so far was Frank Terbeck's prompt_ft_setup 
page[1].  Otherwise I'd've had to have read even more of the code to 
figure out the various

zstyle ':vcs_info:*' actionformats ''
zstyle ':vcs_info:*' formats ''
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat

tricks that are available.

I already do a bunch of stuff in my pre_cmd and pre_exec functions, and 
I'd really like to just add some things to my prompt conditioned on 
whether (for example) the current git repo is in a rebase, and maybe a 
shortened version of the branch name.  So, is there a way to get the 
info out of vcs_info?

-- 
Best,
Ben

[1] http://ft.bewatermyfriend.org/comp/zsh/functions/prompt_ft_setup.html



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