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

Re: vcs_info problem

On Sun, Nov 23, 2008 at 10:44:39PM +0100, Frank Terbeck wrote:
> Simon Ruderich <simon@xxxxxxxxxxxx>:
>> 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%# '
>                     here is your unmatched double quote --^

Thanks for your answer,

but when I remove the double quote it still doesn't work and I get this error:

    unmatched '

I took the example from the zshcontrib man page so it looks like there is an

>> But if I use this vcs_info_msg_0_ is not expanded and stays in the prompt all
>> the time.
> If you want to use $vcs_info_msg_0_ like this, you will need to use:
>     setopt promptsubst
> Regards, Frank

Thanks, setting promptsubst worked fine.

I followed the introduction in the zshcontrib man page. Would it be possible
to add this information there so other users can set it up without any

Just curious, what other ways to use vcs_info than ${vcs_info_msg_0_} exist?

+ privacy is necessary
+ using http://gnupg.org
+ public key id: 0x6115F804EFB33229

Attachment: pgpm6ajxq1TgJ.pgp
Description: PGP signature

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