zsh-users
 help / color / mirror / code / Atom feed
From: Simon Ruderich <simon@ruderich.org>
To: zsh-users@sunsite.dk
Subject: Re: vcs_info problem
Date: Sun, 23 Nov 2008 23:04:46 +0100	[thread overview]
Message-ID: <20081123220446.GA8594@ruderich.org> (raw)
In-Reply-To: <20081123214438.GB2757@fsst.voodoo.lan>

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

On Sun, Nov 23, 2008 at 10:44:39PM +0100, Frank Terbeck wrote:
> Simon Ruderich <simon@ruderich.org>:
>> 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
error.

>> 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
problems?

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

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

[-- Attachment #2: Type: application/pgp-signature, Size: 194 bytes --]

  reply	other threads:[~2008-11-23 22:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-23 21:32 Simon Ruderich
2008-11-23 21:44 ` Frank Terbeck
2008-11-23 22:04   ` Simon Ruderich [this message]
2008-11-23 22:26     ` Frank Terbeck
2008-11-23 23:18       ` Simon Ruderich
2008-11-26  2:58     ` Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081123220446.GA8594@ruderich.org \
    --to=simon@ruderich.org \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).