about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-30 10:17:30 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-30 10:17:30 +0000
commit5e1dc5dc013a510fdb971566dab86f4987419cac (patch)
tree4dbe8a1069224b603703acf2adf927f193245689 /Doc
parentffa18a29ab864c60153601616053e0e3158235e9 (diff)
downloadzsh-5e1dc5dc013a510fdb971566dab86f4987419cac.tar.gz
zsh-5e1dc5dc013a510fdb971566dab86f4987419cac.tar.xz
zsh-5e1dc5dc013a510fdb971566dab86f4987419cac.zip
zsh-workers/7540
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/expn.yo15
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index b9af9b83f..cafd1feaa 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -447,6 +447,21 @@ match for tt(t*e) is substituted and the result is `tt(spy star)',
 while in the second case, the shortest matches are taken and the
 result is `tt(spy spy lispy star)'.
 )
+xitem(tt(${)var(name)tt(^)var(pattern)tt(^)var(then)tt(^)var(else)tt(}))
+item(tt(${)var(name)tt(^^)var(pattern)tt(^)var(then)tt(^)var(else)tt(}))(
+If the expansion of var(name) matches the var(pattern), the var(then)
+string is substituted, otherwise the var(else) string is
+substituted. In the second form the var(pattern) is taken to be
+negated (even if the tt(EXTENDED_GLOB) option is not set. The
+var(else) string with the preceding `tt(^)' may be omitted in which
+case the expansion behaves as if var(name) were unset (or, if
+var(name) is an array, as if the element compared did not exist). In
+the var(pattern) and the var(then) string a `tt(^)' may be included by 
+preceding it with two backslashes. Finally, the var(then) and
+var(else) string may consist of only a dot to make it expand to the
+original string. To make them expand to only a dot, the string
+`tt(\.)' has to be used.
+)
 item(tt(${#)var(spec)tt(}))(
 If var(spec) is one of the above substitutions, substitute
 the length in characters of the result instead of