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

Re: vcs_info: can't get %c and %u to perform as expected



Alex Satrapa <grail <at> goldweb.com.au> writes:
> My confusion is thus down to what vcs_info means by "staged" and
> "unstaged".

That is Git terminology. "Unstaged" in Mercurial terminology is when
your working directory has uncommitted changes -- i.e., your working
directory is not "clean".

> For now, my quest is to figure out if/how vcs_info can expose
> the information from 'git status —porcelain' or 'hg status' to a
> ZSH prompt.

This is information is already available in the Mercurial backend; if
your working directory is not clean it will display a "U" character. In
my vcs_info configuration I have the following style to make the display
more similar to the `hg id` output.

zstyle ':vcs_info:hg*:*' unstagedstr "+"

If you want to change the color of the branch name instead, you can
easily write a short hook to do so.



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