mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 19:41:15 -03:00
Update docs to reflect new if/while condtion chaining
Documents new behavior in #1428
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user