zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@sunsite.dk
Subject: Re: Wish for rprompt feature
Date: Sat, 20 Mar 2004 17:10:38 +0000	[thread overview]
Message-ID: <1040320171038.ZM18075@candle.brasslantern.com> (raw)
In-Reply-To: <cmy4g3am024u$.dlg@thorstenkampe.de>

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".


  reply	other threads:[~2004-03-20 17:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19 11:41 Thorsten Kampe
2004-03-20 17:10 ` Bart Schaefer [this message]
2004-03-20 18:12   ` Thorsten Kampe
2004-03-21  1:29     ` Bart Schaefer
2004-03-24 20:25       ` Thorsten Kampe
2004-03-25  3:07         ` Bart Schaefer
2004-03-20 19:28   ` Wayne Davison
2004-03-21  0:00     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1040320171038.ZM18075@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).