mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-23 04:30:24 +02:00
16492: add RPROMPT2 variable for right prompts in multi-line commands
This commit is contained in:
parent
b1dadd97d3
commit
5d11abfa3b
4 changed files with 23 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2002-01-31 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* Derek Peschel: 16492: Src/params.c, Src/input.c, Doc/Zsh/params.yo:
|
||||
add RPROMPT2 variable for right prompts in multi-line commands
|
||||
|
||||
2002-01-31 Andrew Main (Zefram) <zefram@zsh.org>
|
||||
|
||||
* 16527: Src/Zle/zle_refresh.c: Don't lose the rprompt when
|
||||
|
|
|
@ -966,6 +966,15 @@ when the primary 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(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.
|
||||
|
|
|
@ -226,8 +226,11 @@ inputline(void)
|
|||
|
||||
/* 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)
|
||||
|
|
|
@ -65,6 +65,7 @@ char *argzero, /* $0 */
|
|||
*prompt4, /* $PROMPT4 */
|
||||
*readnullcmd, /* $READNULLCMD */
|
||||
*rprompt, /* $RPROMPT */
|
||||
*rprompt2, /* $RPROMPT2 */
|
||||
*sprompt, /* $SPROMPT */
|
||||
*wordchars, /* $WORDCHARS */
|
||||
*zsh_name; /* $ZSH_NAME */
|
||||
|
@ -193,12 +194,14 @@ IPDEF7("OPTARG", &zoptarg),
|
|||
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),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue