about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-08-08 18:48:30 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-08-08 18:48:30 -0700
commit349fe907cb57ade811cab1096a6171dcc78e561d (patch)
tree991b900b820b4955ee79726cdd42914c922f922e
parent6fc3b67b80c5bef6b1241657f7d1e5f55f6af1bf (diff)
downloadzsh-349fe907cb57ade811cab1096a6171dcc78e561d.tar.gz
zsh-349fe907cb57ade811cab1096a6171dcc78e561d.tar.xz
zsh-349fe907cb57ade811cab1096a6171dcc78e561d.zip
mention 32971 in NEWS, clarify RPROMPT behavior in docs
-rw-r--r--ChangeLog5
-rw-r--r--Doc/Zsh/prompt.yo8
-rw-r--r--NEWS7
3 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e2f5dbcd7..a38b0d573 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
 	* 32971 (plus doc tweak): Doc/Zsh/prompt.yo, Src/prompt.c:
diff --git a/Doc/Zsh/prompt.yo b/Doc/Zsh/prompt.yo
index 5d75a365a..0ed52b580 100644
--- a/Doc/Zsh/prompt.yo
+++ b/Doc/Zsh/prompt.yo
@@ -280,7 +280,8 @@ and var(false-text) may both contain arbitrarily-nested escape
 sequences, including further ternary expressions.
 
 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:
 
 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 at least var(n) characters have already been
 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(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).)
@@ -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
 negative length, a length of 1 is used.  In other words, a negative
 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,
 and the forms with `tt(>)' truncate at the right of the string.
diff --git a/NEWS b/NEWS
index 87e67fd27..98dc0437a 100644
--- a/NEWS
+++ b/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
 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
 -----------------------------