diff options
Diffstat (limited to 'doc_src/while.txt')
-rw-r--r-- | doc_src/while.txt | 9 |
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 |