aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/while.txt
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-05-19 13:00:40 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-05-19 13:01:12 -0700
commit30ea7cc3f8a5d56ad30dc749ea374363c15f312a (patch)
tree93d6ec24f73cd82906ab1c8c622451c3f62a9524 /doc_src/while.txt
parent573b3797a507c3912197ebd4f2df0dc0398d3826 (diff)
Update docs to reflect new if/while condtion chaining
Documents new behavior in #1428
Diffstat (limited to 'doc_src/while.txt')
-rw-r--r--doc_src/while.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc_src/while.txt b/doc_src/while.txt
index c06874d5..855edce1 100644
--- a/doc_src/while.txt
+++ b/doc_src/while.txt
@@ -11,12 +11,11 @@ while CONDITION; COMMANDS...; end
If the exit status of `CONDITION` is non-zero on the first iteration, `COMMANDS` will not be executed at all.
-Use <a href="#begin">`begin; ...; end`</a> for complex conditions; more complex control can be achieved with `while true` containing a <a href="#break">break</a>.
-
+You can use <a href="#and">`and`</a> or <a href="#and">`or`</a> for complex conditions. Even more complex control can be achieved with `while true` containing a <a href="#break">break</a>.
\subsection while-example Example
\fish
-while test -f foo.txt; echo file exists; sleep 10; end
-# outputs 'file exists' at 10 second intervals as long as the file foo.txt exists.
-\endfish \ No newline at end of file
+while test -f foo.txt; or test -f bar.txt ; echo file exists; sleep 10; end
+# outputs 'file exists' at 10 second intervals as long as the file foo.txt or bar.txt exists.
+\endfish