about summary refs log tree commit diff
path: root/Doc/Zsh/cond.yo
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2000-05-16 16:21:33 +0000
committerBart Schaefer <barts@users.sourceforge.net>2000-05-16 16:21:33 +0000
commita04a3a9e6543c800bc874950dbe56f1add01a847 (patch)
tree430fbcfe637ecb6f333ee4b521f169e32d3a56f3 /Doc/Zsh/cond.yo
parent26a467f4067fdda2f627e3b6ce76ea2c54e1b464 (diff)
downloadzsh-a04a3a9e6543c800bc874950dbe56f1add01a847.tar.gz
zsh-a04a3a9e6543c800bc874950dbe56f1add01a847.tar.xz
zsh-a04a3a9e6543c800bc874950dbe56f1add01a847.zip
Fix typos and remove RCS Id strings.
Diffstat (limited to 'Doc/Zsh/cond.yo')
-rw-r--r--Doc/Zsh/cond.yo25
1 files changed, 25 insertions, 0 deletions
diff --git a/Doc/Zsh/cond.yo b/Doc/Zsh/cond.yo
index 0ff49b187..73430dd5a 100644
--- a/Doc/Zsh/cond.yo
+++ b/Doc/Zsh/cond.yo
@@ -149,6 +149,20 @@ true if either var(exp1) or var(exp2) is true.
 )
 enditem()
 
+Normal shell expansion is performed on the var(file), var(string) and
+var(pattern) arguments, but the result of each expansion is constrained to
+be a single word, similar to the effect of double quotes.  However, pattern
+metacharacters are active for the var(pattern) arguments; the patterns
+are the same as those used for filename generation, see
+ifzman(\
+zmanref(zshexpn)\
+)\
+ifnzman(\
+noderef(Filename Generation)\
+)\
+, but there is no special behaviour
+of `tt(/)' nor initial dots, and no glob qualifiers are allowed.
+
 In each of the above expressions, if
 var(file) is of the form `tt(/dev/fd/)var(n)',
 where var(n) is an integer,
@@ -156,3 +170,14 @@ then the test applied to the open file whose
 descriptor number is var(n),
 even if the underlying system does not support
 the tt(/dev/fd) directory.
+
+In the forms which do numeric comparison, the expressions var(exp)
+undergo arithmetic expansion as if they were enclosed in tt($((...))).
+
+For example, the following:
+
+example([[ ( -f foo || -f bar ) && $report = y* ]] && print File exists.)
+
+tests if either file tt(foo) or file tt(bar) exists, and if so, if the
+value of the parameter tt(report) begins with `tt(y)'; if the complete
+condition is true, the message `tt(File exists.)' is printed.