From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15758 invoked from network); 20 Mar 2004 17:10:58 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 20 Mar 2004 17:10:58 -0000 Received: (qmail 26108 invoked by alias); 20 Mar 2004 17:10:45 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7206 Received: (qmail 26009 invoked from network); 20 Mar 2004 17:10:44 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 20 Mar 2004 17:10:44 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [167.160.213.139] by sunsite.dk (MessageWall 1.0.8) with SMTP; 20 Mar 2004 17:10:44 -0000 Received: from moonbase.zanshin.com (IDENT:schaefer@localhost [127.0.0.1]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i2KHAhNR021300 for ; Sat, 20 Mar 2004 09:10:43 -0800 Received: (from schaefer@localhost) by moonbase.zanshin.com (8.12.11/8.12.11/Submit) id i2KHAhlC021299 for zsh-users@sunsite.dk; Sat, 20 Mar 2004 09:10:43 -0800 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id i2KHAc318076; Sat, 20 Mar 2004 09:10:38 -0800 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to schaefer@closedmail.com using -f From: Bart Schaefer Message-Id: <1040320171038.ZM18075@candle.brasslantern.com> Date: Sat, 20 Mar 2004 17:10:38 +0000 In-Reply-To: Comments: In reply to Thorsten Kampe "Wish for rprompt feature" (Mar 19, 12:41pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-users@sunsite.dk Subject: Re: Wish for rprompt feature MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Envelope-Sender: On Mar 19, 12:41pm, Thorsten Kampe wrote: } } I have my pwd ("%~") in my RPROMPT (as probably many people). When the } path to the pwd is long (or I type a long command line) the rprompt } disappears and makes place for my typing. } } This is a feature and generally a good thing but the problem is that } the /whole/ rprompt disappears and not just the space I need. Have you looked at some of the "prompt themes" that come with recent zsh? A couple of them include two-line prompts that put the working directory on the upper line, out of the way. E.g. my prompt (the "bart" theme in the distribution) looks like this (I've narrowed it to a 70 column terminal in hopes of avoiding line wrap): zagzig [cvstat] /usr/src/local/zsh/zsh-4.0 04-03-20 8:47AM schaefer[603] 4.0.6 Only the zsh version (4.0.6) is in the "real" RPS1, everything else is in PS1, but the date and time at upper right behave like an rprompt in that they'll disappear if the previous command (in brackets -- cvstat is an alias that runs "cvs status" through a sed script) or the directory name get too long. The prompt will even go to three lines if it must: zagzig /usr/src/local/zsh/zsh-4.0 04-03-20 8:53AM [echo this is a really long command string for example] schaefer[605] 4.0.6 And the various bits are all differently colored, too which obviously you can't see in this email. By the way, running "prompt bart" just adds the upper line to your existing PS1 and RPS1 -- it doesn't change the lower- left part -- so to get the above effect I use PS1='%n[%h] ' RPS1=$ZSH_VERSION prompt bart The other theme that does something similar is "clint".