mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
parent
4e2b11f2e0
commit
298c580e72
4 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ COMMAND1; and COMMAND2
|
|||
|
||||
`and` statements may be used as part of the condition in an <a href="#if">`if`</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.
|
||||
|
||||
`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.
|
||||
`and` does not change the current exit status itself, but the command it runs most likely will. 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
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ The block is unconditionally executed. `begin; ...; end` is equivalent to `if tr
|
|||
|
||||
`begin` is used to group a number of commands into a block. This allows the introduction of a new variable scope, redirection of the input or output of a set of commands as a group, or to specify precedence when using the conditional commands like `and`.
|
||||
|
||||
`begin` does not change the current exit status.
|
||||
`begin` does not change the current exit status itself. After the block has completed, `$status` will be set to the status returned by the most recent command.
|
||||
|
||||
|
||||
\subsection begin-example Example
|
||||
|
|
|
@ -16,4 +16,4 @@ switch VALUE; [case [WILDCARD...]; [COMMANDS...]; ...] end
|
|||
For more information, read the
|
||||
documentation for the block constructs, such as `if`, `for` and `while`.
|
||||
|
||||
The `end` command does not change the current exit status.
|
||||
The `end` command does not change the current exit status. Instead, the status after it will be the status returned by the most recent command.
|
||||
|
|
|
@ -12,7 +12,7 @@ COMMAND1; or COMMAND2
|
|||
`or` 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.
|
||||
|
||||
`or` 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.
|
||||
`or` does not change the current exit status itself, but the command it runs most likely will. 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 or-example Example
|
||||
|
||||
|
|
Loading…
Reference in a new issue