From: Derek Peschel <dpeschel@eskimo.com>
To: zsh-workers@sunsite.dk
Subject: PATCH: 4.0.2: rprompt2 variable
Date: Fri, 25 Jan 2002 04:48:08 -0800 [thread overview]
Message-ID: <20020125044808.C7661@eskimo.eskimo.com> (raw)
Even if a feature (right-hand prompts) is frivolous, it might as well be
available in general.
Now you can see the parser state (or whatever else you might want to put
in PROMPT2) and still have a consistent left margin when entering a multi-
line command. See my companion "reverse parser state" patch if you want
the parser state to expand leftward on your screen.
Comments welcome (I just started using zsh and I have no idea if anyone
else will find these patches useful).
-- Derek
--- Src/params.c.orig Thu Jan 24 15:23:36 2002
+++ Src/params.c Thu Jan 24 18:33:52 2002
@@ -65,6 +65,7 @@
*prompt4, /* $PROMPT4 */
*readnullcmd, /* $READNULLCMD */
*rprompt, /* $RPROMPT */
+ *rprompt2, /* $RPROMPT2 */
*sprompt, /* $SPROMPT */
*wordchars, /* $WORDCHARS */
*zsh_name; /* $ZSH_NAME */
@@ -193,12 +194,14 @@
IPDEF7("NULLCMD", &nullcmd),
IPDEF7("POSTEDIT", &postedit),
IPDEF7("READNULLCMD", &readnullcmd),
-IPDEF7("RPROMPT", &rprompt),
IPDEF7("PS1", &prompt),
+IPDEF7("RPS1", &rprompt),
+IPDEF7("RPROMPT", &rprompt),
IPDEF7("PS2", &prompt2),
+IPDEF7("RPS2", &rprompt2),
+IPDEF7("RPROMPT2", &rprompt2),
IPDEF7("PS3", &prompt3),
IPDEF7("PS4", &prompt4),
-IPDEF7("RPS1", &rprompt),
IPDEF7("SPROMPT", &sprompt),
IPDEF7("0", &argzero),
--- Src/input.c.orig Thu Jan 24 15:38:18 2002
+++ Src/input.c Thu Jan 24 18:33:53 2002
@@ -222,8 +222,11 @@
/* If reading code interactively, work out the prompts. */
if (interact && isset(SHINSTDIN)) {
- if (!isfirstln)
+ if (!isfirstln) {
ingetcpmptl = prompt2;
+ if (rprompt2)
+ ingetcpmptr = rprompt2;
+ }
else {
ingetcpmptl = prompt;
if (rprompt)
--- Doc/Zsh/params.yo.orig Thu Jan 24 19:33:03 2002
+++ Doc/Zsh/params.yo Thu Jan 24 19:34:34 2002
@@ -955,6 +955,15 @@
This does not work if the tt(SINGLELINEZLE) option is set.
It is expanded in the same way as tt(PS1).
)
+vindex(RPROMPT2)
+xitem(tt(RPROMPT2) <S>)
+vindex(RPS2)
+item(tt(RPS2) <S>)(
+This prompt is displayed on the right-hand side of the screen
+when the secondary prompt is being displayed on the left.
+This does not work if the tt(SINGLELINEZLE) option is set.
+It is expanded in the same way as tt(PS2).
+)
vindex(SAVEHIST)
item(tt(SAVEHIST))(
The maximum number of history events to save in the history file.
next reply other threads:[~2002-01-25 12:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-25 12:48 Derek Peschel [this message]
2002-01-29 18:21 ` Oliver Kiddle
2002-01-31 5:01 ` Derek Peschel
2002-01-31 14:12 ` Oliver Kiddle
2002-01-31 12:06 ` Peter Stephenson
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=20020125044808.C7661@eskimo.eskimo.com \
--to=dpeschel@eskimo.com \
--cc=zsh-workers@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).