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

Re: Length of %? in prompt



On Thu, Feb 28, 2002 at 01:00:06PM -0800, Bart Schaefer wrote:
> On Thu, 28 Feb 2002, Ian Lynagh wrote:
> 
> > What I'm doing is something like this:
> >
> So something like (still using / and \ rather than graphics chars):
> 
> UL="$fg_bold[cyan]/"	# upper left
> UR="$fg_bold[cyan]\\"	# upper right
> PS1='$UL%$((COLUMNS-4))>->-stuff--more stuff--some more stuff---%<<$UR
> \$ $reset_color'

This won't help as the - still needs to be in the right colour etc, but

PS1='$UL%$((COLUMNS-3))>>-stuff--more stuff--some more stuff---%<<$UR
\$ $reset_color'

does what I want.

> For a much more complicated example of this same thing, see
> 
> 	Functions/Prompts/prompt_adam2_setup
> 
> in the 4.0.4 distribution.

OK, I'll take a look  :-)


Thanks
Ian



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