aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc_src/if.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc_src/if.txt')
-rw-r--r--doc_src/if.txt13
1 files changed, 9 insertions, 4 deletions
diff --git a/doc_src/if.txt b/doc_src/if.txt
index f1238002..ed19fbe0 100644
--- a/doc_src/if.txt
+++ b/doc_src/if.txt
@@ -5,10 +5,15 @@
\subsection if-description Description
-<tt>if</tt> will execute the command CONDITION. If the condition's exit
-status is 0, the commands COMMANDS_TRUE will execute. If it is not 0 and
-<tt>else</tt> is given, COMMANDS_FALSE will be executed. Hint: use
-<a href="#begin"><tt>begin; ...; end</tt></a> for complex conditions.
+<tt>if</tt> will execute the command CONDITION. If the condition's
+exit status is 0, the commands COMMANDS_TRUE will execute. If the
+exit status is not 0 and <tt>else</tt> is given, COMMANDS_FALSE will
+be executed.
+
+In order to use the exit status of mutiple commands as the condition
+of an if block, use <a href="#begin"><tt>begin; ...; end</tt></a> and
+the short circut commands <a href="commands.html#and">and</a> and <a
+href="commands.html#or">or</a>.
The exit status of the last foreground command to exit can always be
accessed using the <a href="index.html#variables-status">$status</a>