From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29020 invoked from network); 1 Mar 2002 12:38:20 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 1 Mar 2002 12:38:20 -0000 Received: (qmail 8263 invoked by alias); 1 Mar 2002 12:38:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4727 Received: (qmail 8250 invoked from network); 1 Mar 2002 12:38:07 -0000 Date: Fri, 1 Mar 2002 12:38:08 +0000 From: Ian Lynagh To: zsh-users@sunsite.dk Subject: Re: Length of %? in prompt Message-ID: <20020301123808.GB9242@stu163.keble.ox.ac.uk> Mail-Followup-To: zsh-users@sunsite.dk References: <20020228171254.GA32284@stu163.keble.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.25i Sender: Ian Lynagh 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