From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1510 invoked from network); 6 Jun 2005 15:04:34 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 6 Jun 2005 15:04:34 -0000 Received: (qmail 36440 invoked from network); 6 Jun 2005 15:04:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 6 Jun 2005 15:04:26 -0000 Received: (qmail 15380 invoked by alias); 6 Jun 2005 15:04:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8958 Received: (qmail 15370 invoked from network); 6 Jun 2005 15:04:18 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 6 Jun 2005 15:04:18 -0000 Received: (qmail 35440 invoked from network); 6 Jun 2005 15:04:18 -0000 Received: from dan.emsphone.com (199.67.51.101) by a.mx.sunsite.dk with SMTP; 6 Jun 2005 15:04:11 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j56F49mR065023 for zsh-users@sunsite.dk; Mon, 6 Jun 2005 10:04:09 -0500 (CDT) (envelope-from dan) Date: Mon, 6 Jun 2005 10:04:09 -0500 From: Dan Nelson To: zsh users Subject: Re: lining up RPS1 and PS1 Message-ID: <20050606150409.GM255@dan.emsphone.com> References: <20050606101820.GC26977@atoom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050606101820.GC26977@atoom.net> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 In the last episode (Jun 06), Miek Gieben said: > Hello, > > I've been looking into the RPS1 variable to spice up my prompt. > Currently my prompt looks like this: (it's a 2-line prompt) > > [some info] > % > > Now I wanted to make it look like this: > [some info] [some more] > % > (where RPS1="[some more]") > > But as the PS1 includes a newline (to put the '%' on a seperate line) > the prompt looks like: > [some info] > % [some more] > > Is there any way to make a RPS1 line up with the first part of the PS1 > /and/ still have a newline in the PS1? Simplest workaround would be to add escape codes to the start and end of your RPROMPT that shifts the cursor up then back down: RPROMPT="%{$termcap[up]%}Right Justified%{$termcap[do]%}" Alternatively, take a look at the 'bart' prompt style, which is a 2-line prompt with right-aligned text on the top line. -- Dan Nelson dnelson@allantgroup.com