From: Dan Nelson <dnelson@allantgroup.com>
To: zsh users <zsh-users@sunsite.dk>
Subject: Re: lining up RPS1 and PS1
Date: Mon, 6 Jun 2005 10:04:09 -0500 [thread overview]
Message-ID: <20050606150409.GM255@dan.emsphone.com> (raw)
In-Reply-To: <20050606101820.GC26977@atoom.net>
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
next prev parent reply other threads:[~2005-06-06 15:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-06 10:18 Miek Gieben
2005-06-06 10:35 ` Thorsten Kampe
2005-06-06 10:43 ` Miek Gieben
2005-06-06 10:53 ` Thorsten Kampe
2005-06-06 15:09 ` Gmane (Re: lining up RPS1 and PS1) Bart Schaefer
2005-06-06 16:23 ` Thorsten Kampe
2005-06-06 16:42 ` Miek Gieben
2005-06-06 16:53 ` Bart Schaefer
2005-06-06 15:04 ` Dan Nelson [this message]
2005-06-06 15:23 ` lining up RPS1 and PS1 Bart Schaefer
2005-06-06 16:38 ` Miek Gieben
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=20050606150409.GM255@dan.emsphone.com \
--to=dnelson@allantgroup.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).