Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Length of %? in prompt
- X-seq: zsh-users 4696
- From: Ian Lynagh <igloo@xxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Length of %? in prompt
- Date: Tue, 26 Feb 2002 18:08:07 +0000
- In-reply-to: <1020226171045.ZM9835@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020226160503.GA15163@xxxxxxxxxxxxxxxxxxxxx> <1020226171045.ZM9835@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: Ian Lynagh <ian@xxxxxxxxxxxxxxxxxx>
On Tue, Feb 26, 2002 at 05:10:45PM +0000, Bart Schaefer wrote:
> On Feb 26, 4:05pm, Ian Lynagh wrote:
> }
> } If the length of %? will alter the number of dashes following it in my
> } prompt am I right in thinking that my only course of action is to
> } enumerate the (rather large!) set of possible cases with
> } "%(n?,---...,)"? If so I guess I will have to redesign :-(
>
> No, you don't need to do that. You can use the truncation sequences %>>
> and/or %<<. Let's assume that you want the value of %? plus the hyphens
> to take up a total of 10 characters; you'd use:
>
> %10>-->%?--------%<<
Oh, of course! In fact, if I am lucky this will make the whole thing a
bit simpler.
I don't understand this 0 case though - is it a bug?
ian@majestica:~% export PS1="%10>-->0--------%<< "
0-------- export PS1="%10>-->10--------%<< "
10-------- export PS1="%10>-->100--------%<< "
100------- export PS1="%10>-->1000--------%<< "
1000------ echo $ZSH_VERSION
4.0.4
Thanks
Ian
Messages sorted by:
Reverse Date,
Date,
Thread,
Author