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

Re: Probs with nested braces in PROMPT



On Thu, Jul 06, 2000 at 01:59:53PM +0400, Andrej Borsenkow wrote:
> >
> > PROMPT='%{^[[5;46m%}%m:%l %T %~${PROJECT:+
> > %{^[[31m[%}}$PROJECT${PROJECT:+]%{^[[30m%}}%#%{^[[0m%}'
> >
> 
> You do have promptsubst set, don't you?
> 
> What about
> 
> PROMPT='%{^[[5;46m%}%m:%l %T %~${PROJECT:+
> %{^[[31m[%\}}$PROJECT${PROJECT:+]%{^[[30m%\}}%#%{^[[0m%}'
> 
> (note, that `}' in %} are quoted). This seems to work. I suspect, why it
> happens, but I do not know code good enugh.

Thanks, this works. My first attempt was to quote both of the braces %\{
...  %\}, but that resulted in something like this:

    eggink3:2 13:01 ~/necht {[ecc]{%

Regards,
Bernd

-- 
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@xxxxxxxxxxxxxx
http://www.rrz.uni-hamburg.de/eggink/BEggink.html



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