about summary refs log tree commit diff
path: root/Doc/Zsh/prompt.yo
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:07:38 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:07:38 +0000
commitf13624e0f8a3c28c90aa0ce8ee36b639a491e4a9 (patch)
tree7ebc57c7b2ceed481e23f598011dc88d159c9178 /Doc/Zsh/prompt.yo
parenta61dc2074ae6cd00f1c166dc0102c491db056060 (diff)
downloadzsh-3.1.5-pws-2.tar.gz
zsh-3.1.5-pws-2.tar.xz
zsh-3.1.5-pws-2.zip
zsh-3.1.5-pws-2 zsh-3.1.5-pws-2
Diffstat (limited to 'Doc/Zsh/prompt.yo')
-rw-r--r--Doc/Zsh/prompt.yo31
1 files changed, 24 insertions, 7 deletions
diff --git a/Doc/Zsh/prompt.yo b/Doc/Zsh/prompt.yo
index e1628da86..685cca8c4 100644
--- a/Doc/Zsh/prompt.yo
+++ b/Doc/Zsh/prompt.yo
@@ -175,6 +175,8 @@ sitem(tt(w))(True if the day of the week is equal to var(n) (Sunday = 0).)
 sitem(tt(?))(True if the exit status of the last command was var(n).)
 sitem(tt(#))(True if the effective uid of the current process is var(n).)
 sitem(tt(g))(True if the effective gid of the current process is var(n).)
+sitem(tt(l))(True if at least var(n) characters have already been
+printed on the current line.)
 sitem(tt(L))(True if the tt(SHLVL) parameter is at least var(n).)
 sitem(tt(S))(True if the tt(SECONDS) parameter is at least var(n).)
 sitem(tt(v))(True if the array tt(psvar) has at least var(n) elements.)
@@ -185,25 +187,40 @@ endsitem()
 xitem(tt(%<)var(string)tt(<))
 xitem(tt(%>)var(string)tt(>))
 item(tt(%[)var(xstring)tt(]))(
-Specifies truncation behaviour.
+Specifies truncation behaviour for the remainder of the prompt string.
 The third, deprecated, form is equivalent to `tt(%)var(xstringx)',
 i.e. var(x) may be `tt(<)' or `tt(>)'.
 The numeric argument, which in the third form may appear immediately
 after the `tt([)', specifies the maximum permitted length of
-the various strings that can be displayed in the prompt.  If this
-integer is zero, or missing, truncation is disabled.  Truncation is
-initially disabled.
+the various strings that can be displayed in the prompt.
 The var(string) will be displayed in
-place of the truncated portion of any string.
+place of the truncated portion of any string; note this does not
+undergo prompt expansion.
 
 The forms with `tt(<)' truncate at the left of the string,
 and the forms with `tt(>)' truncate at the right of the string.
 For example, if the current directory is `tt(/home/pike)',
 the prompt `tt(%8<..<%/)' will expand to `tt(..e/pike)'.
 In this string, the terminating character (`tt(<)', `tt(>)' or `tt(])'),
-or in fact any character, may be quoted by a preceding `tt(\)'.
-% escapes are em(not) recognised.
+or in fact any character, may be quoted by a preceding `tt(\)'; note
+when using tt(print -P), however, that this must be doubled as the
+string is also subject to standard tt(print) processing, in addition
+to any backslashes removed by a double quoted string:  the worst case
+is therefore `tt(print -P "%<\\\\<<...")'.
+
 If the var(string) is longer than the specified truncation length,
 it will appear in full, completely replacing the truncated string.
+
+The part of the prompt string to be truncated runs to the end of the
+string, or to the end of the next enclosing group of the `tt(%LPAR())'
+construct, or to the next truncation encountered at the same grouping
+level (i.e. truncations inside a `tt(%LPAR())' are separate), which
+ever comes first.  In particular, a truncation with argument zero
+(e.g. `tt(%<<)') marks the end of the range of the string to be
+truncated while turning off truncation from there on. For example, the
+prompt '%10<...<%~%<<%# ' will print a truncated representation of the
+current directory, followed by a `tt(%)' or `tt(#)', followed by a
+space.  Without the `tt(%<<)', those two characters would be included
+in the string to be truncated.
 )
 enditem()