Update docs to reflect new if/while condtion chaining

Documents new behavior in #1428
This commit is contained in:
ridiculousfish
2016-05-19 13:00:40 -07:00
parent 573b3797a5
commit 30ea7cc3f8
4 changed files with 15 additions and 16 deletions

View File

@@ -7,11 +7,12 @@ COMMAND1; and COMMAND2
\subsection and-description Description
`and` is used to execute a command if the current exit status (as set by the last previous command) is 0.
`and` is used to execute a command if the current exit status (as set by the previous command) is 0.
`and` does not change the current exit status.
`and` statements may be used as part of the condition in an <a href="#if">`and`</a> or <a href="#while">`while`</a> block. See the documentation
for <a href="#if">`if`</a> and <a href="#while">`while`</a> for examples.
The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
`and` does not change the current exit status. The exit status of the last foreground command to exit can always be accessed using the <a href="index.html#variables-status">$status</a> variable.
\subsection and-example Example