summaryrefslogtreecommitdiff
path: root/Base
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-09-09 23:36:59 +0430
committerAndreas Kling <kling@serenityos.org>2020-09-10 11:20:22 +0200
commitc296bcc1d93e1172e9a9398f9ce9f982a15387f9 (patch)
tree2bbb5b54d9477456b8d8f6a6b023b790db7a68db /Base
parent2a3166e52310c886fe1f60b08bc1ceba3353532a (diff)
downloadserenity-c296bcc1d93e1172e9a9398f9ce9f982a15387f9.zip
Base: Tweak Shell(5) manpage a bit
Someone brought to my attention that "or missing" is not correct there.
Diffstat (limited to 'Base')
-rw-r--r--Base/usr/share/man/man5/Shell.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/Base/usr/share/man/man5/Shell.md b/Base/usr/share/man/man5/Shell.md
index 3671467e89..6819691e2e 100644
--- a/Base/usr/share/man/man5/Shell.md
+++ b/Base/usr/share/man/man5/Shell.md
@@ -58,6 +58,8 @@ Any text following a `#` in _bareword_ position, up to but not including a newli
The following tokens:
* `for` in command name position
* `in` as a syntactic element of a `for` expression
+* `if` in command name position, or after the `else` keyword
+* `else` after a partial `if` expression
##### Special characters
Any of the following:
@@ -164,10 +166,10 @@ 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 an _else clause_.
+An `if` expression contains at least a _condition_ 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, or missing.
+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.