Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Length of %? in prompt
- X-seq: zsh-users 4716
- From: Ian Lynagh <igloo@xxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Length of %? in prompt
- Date: Thu, 28 Feb 2002 15:34:00 +0000
- In-reply-to: <Pine.LNX.4.33.0202261047240.14523-100000@xxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020226184213.GA16659@xxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.33.0202261047240.14523-100000@xxxxxxxxxxxxxxxx>
- Sender: Ian Lynagh <ian@xxxxxxxxxxxxxxxxxx>
On Tue, Feb 26, 2002 at 11:21:19AM -0800, Bart Schaefer wrote:
> On Tue, 26 Feb 2002, Ian Lynagh wrote:
>
> > One more thing...as the first % escapes the second in
> > "%%1v>-->%?---------%<< " it looks like there is no way to change this
> > value on the fly without recreating the prompt - is this correct?
>
> If you "setopt promptsubst" you can use a variable for the width:
I was trying to avoid this in favour of psvar, but I think it might be
the best way to do this.
I have just a couple more problems. Firstly I can't find a way to have
ANSI escape sequences actually executed when they are passed through
psvar - is this possible?
And secondly with
"%\$((\$COLUMNS-2))>%{%}k>"
the %{%} appear in the prompt and both
"%\$((\$COLUMNS-2))>${(%%):-%{$fg_bold[cyan]%\}}k>"
and "%\$((\$COLUMNS-2))>\${(%%):-%{$fg_bold[cyan]%\}}k>"
seem to be counting the length of the ANSI escape sequence in the length
calculation - am I missing something?
Thanks
Ian, who's slowly getting there :-)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author