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

vcs_info problem



Hi,

I'm using Zsh 4.3.9 and trying to use vcs_info. I added the following to my
.zshrc as documented in zshcontrib.

    autoload -Uz vcs_info

    zstyle ':vcs_info:*' actionformats \
        '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
    zstyle ':vcs_info:*' formats       \
        '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
    zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
    precmd () { vcs_info }
    PS1='%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_}'"%f%# '

But it gives me the this error.

    /.zshrc:358: unmatched "

So I tried a simpler approach:

    autoload -Uz vcs_info

    precmd () { vcs_info }
    PS1='${vcs_info_msg_0_}'

But if I use this vcs_info_msg_0_ is not expanded and stays in the prompt all
the time.

    ${vcs_info_msg_0_}

If I execute vcs_info_lastmsg it gives me the correct result when I'm in or
outside of a repository.

Thanks for your help,
Simon
-- 
+ privacy is necessary
+ using http://gnupg.org
+ public key id: 0x6115F804EFB33229

Attachment: pgpruI0Xg0t8V.pgp
Description: PGP signature



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