As Bart noted, you can't use %v as you want to, but you can get the same effect using "set promptsubst" and PS1="\$psvar[1]". This was my solution to a similar problem for my prompt. I attached it in hopes of giving you more ideas, Raul. Regards, Joel On Tue, Jul 26, 2005 at 02:01:09PM +0000, Bart Schaefer wrote: > On Jul 26, 9:33am, DervishD wrote: > } > } > How can I use psvar and %v to get a readable PS1 *but* use escape > } > sequences at the same time? I'm using zsh 4.2.5 (i686-pc-linux-gnu) > } > } I still haven't solved this, and I've carried a lot of tests. Is > } any way of using '%{%}' constructs, or escape sequences, using psvar? > > No, there isn't. The results of percent-expandos are not re-expanded, > so whatever gets inserted by %v appears literally in the final prompt. > Furthermore, anything inserted by any percent-expando (be it your user > name, or the host name, or the contents of psvar) is deliberately put > through a conversion to printable form so that you can't accidentally > mess up ZLE by moving the cursor or emitting something whose displayed > length cannot be accurately counted. > > Consider the bad things that could otherwise result if you created a > directory with strange characters in its name when your prompt has %/ > in it, or had such a directory in your path when using %N. -- Joel Elkins (alternate)