Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Use of vcs_info
- X-seq: zsh-users 14949
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Use of vcs_info
- Date: Sun, 21 Mar 2010 23:09:18 -0400 (EDT)
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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