mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
mention 32971 in NEWS, clarify RPROMPT behavior in docs
This commit is contained in:
parent
6fc3b67b80
commit
349fe907cb
3 changed files with 17 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-08-08 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* unposted: NEWS, Doc/Zsh/prompt.yo: mention 32971 in NEWS,
|
||||||
|
clarify RPROMPT behavior in docs.
|
||||||
|
|
||||||
2014-08-07 Barton E. Schaefer <schaefer@zsh.org>
|
2014-08-07 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* 32971 (plus doc tweak): Doc/Zsh/prompt.yo, Src/prompt.c:
|
* 32971 (plus doc tweak): Doc/Zsh/prompt.yo, Src/prompt.c:
|
||||||
|
|
|
@ -280,7 +280,8 @@ and var(false-text) may both contain arbitrarily-nested escape
|
||||||
sequences, including further ternary expressions.
|
sequences, including further ternary expressions.
|
||||||
|
|
||||||
The left parenthesis may be preceded or followed by a positive integer var(n),
|
The left parenthesis may be preceded or followed by a positive integer var(n),
|
||||||
which defaults to zero. A negative integer will be multiplied by -1.
|
which defaults to zero. A negative integer will be multiplied by -1, except
|
||||||
|
as noted below for `tt(l)'.
|
||||||
The test character var(x) may be any of the following:
|
The test character var(x) may be any of the following:
|
||||||
|
|
||||||
startsitem()
|
startsitem()
|
||||||
|
@ -303,7 +304,8 @@ sitem(tt(j))(True if the number of jobs is at least var(n).)
|
||||||
sitem(tt(L))(True if the tt(SHLVL) parameter is at least var(n).)
|
sitem(tt(L))(True if the tt(SHLVL) parameter is at least var(n).)
|
||||||
sitem(tt(l))(True if at least var(n) characters have already been
|
sitem(tt(l))(True if at least var(n) characters have already been
|
||||||
printed on the current line. When var(n) is negative, true if at least
|
printed on the current line. When var(n) is negative, true if at least
|
||||||
tt(abs)tt(LPAR())var(n)tt(RPAR()) characters remain before the right margin.)
|
tt(abs)tt(LPAR())var(n)tt(RPAR()) characters remain before the opposite
|
||||||
|
margin (thus the left margin for tt(RPROMPT)).)
|
||||||
sitem(tt(S))(True if the tt(SECONDS) parameter is at least var(n).)
|
sitem(tt(S))(True if the tt(SECONDS) parameter is at least var(n).)
|
||||||
sitem(tt(T))(True if the time in hours is equal to var(n).)
|
sitem(tt(T))(True if the time in hours is equal to var(n).)
|
||||||
sitem(tt(t))(True if the time in minutes is equal to var(n).)
|
sitem(tt(t))(True if the time in minutes is equal to var(n).)
|
||||||
|
@ -332,7 +334,7 @@ value of the numeric argument from the number of character positions
|
||||||
remaining on the current prompt line. If this results in a zero or
|
remaining on the current prompt line. If this results in a zero or
|
||||||
negative length, a length of 1 is used. In other words, a negative
|
negative length, a length of 1 is used. In other words, a negative
|
||||||
argument arranges that after truncation at least var(n) characters
|
argument arranges that after truncation at least var(n) characters
|
||||||
remain before the right margin.
|
remain before the right margin (left margin for tt(RPROMPT)).
|
||||||
|
|
||||||
The forms with `tt(<)' truncate at the left of the string,
|
The forms with `tt(<)' truncate at the left of the string,
|
||||||
and the forms with `tt(>)' truncate at the right of the string.
|
and the forms with `tt(>)' truncate at the right of the string.
|
||||||
|
|
7
NEWS
7
NEWS
|
@ -65,6 +65,13 @@ The resulting glob is treated as a single argument. For example,
|
||||||
[[ -n *.c(#qN) ]] tests whether there are any .c files in the current
|
[[ -n *.c(#qN) ]] tests whether there are any .c files in the current
|
||||||
directory.
|
directory.
|
||||||
|
|
||||||
|
In prompt strings, the %N(l.true.false) conditional (line length) and
|
||||||
|
the %N<..< and %N>..> truncation operators now accept negative values
|
||||||
|
of N, which count the remaining space to the opposite margin (positive
|
||||||
|
values of N still count the space used since the start of the prompt).
|
||||||
|
In PS1 and PROMPT, this counts to the right margin, whereas in RPS1 and
|
||||||
|
RPROMPT, it counts to the left margin (not to the opposite prompt).
|
||||||
|
|
||||||
|
|
||||||
Changes between 4.2 and 5.0.0
|
Changes between 4.2 and 5.0.0
|
||||||
-----------------------------
|
-----------------------------
|
||||||
|
|
Loading…
Reference in a new issue