diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2021-01-17 22:36:10 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-18 08:56:34 +0100 |
commit | ffd74a2c5ac489c1b459889746fea046d74d485f (patch) | |
tree | 686fea518e7d440461e7d028058781a692b6f7ff /Base/usr/share | |
parent | 5b79d0d1a33c04000a8b2d74df3376d9f6967fc4 (diff) | |
download | serenity-ffd74a2c5ac489c1b459889746fea046d74d485f.zip |
Base: Mention that the `if` condition is a command
Sorta closes #4991.
Diffstat (limited to 'Base/usr/share')
-rw-r--r-- | Base/usr/share/man/man5/Shell.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Base/usr/share/man/man5/Shell.md b/Base/usr/share/man/man5/Shell.md index 1fd7a72a58..61aa8a4a82 100644 --- a/Base/usr/share/man/man5/Shell.md +++ b/Base/usr/share/man/man5/Shell.md @@ -182,12 +182,12 @@ rm test && echo "deleted!" || echo "failed with $?" ##### Conditionals Conditionals can either be expressed with the _Logical Relations_, or via explicit `if` expressions. -An `if` expression contains at least a _condition_ and a _then clause_, and optionally the `else` keyword followed by an _else clause_. +An `if` expression contains at least a _condition_ command and a _then clause_, and optionally the `else` keyword followed by an _else clause_. An _else clause_ may contain another `if` expression instead of a normal block. The _then clause_ **must** be surrounded by braces, but the _else clause_ may also be another `if` expression. -An `if` expression evaluates either the _then clause_ or (if available) the _else clause_, based on the exit code of the _condition_; should the exit code be zero, the _then clause_ will be executed, and if not, the _else clause_ will. +An `if` expression evaluates either the _then clause_ or (if available) the _else clause_, based on the exit code of the _condition_ command; should the exit code be zero, the _then clause_ will be executed, and if not, the _else clause_ will. ###### Examples ```sh |