mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-24 03:21:15 -03:00
doc: add link to not command from if command
It's very common to want to express negation in a `if` command. Therefore a quick way to learn about the `not` command is handy. Closes #12512
This commit is contained in:
committed by
Johannes Altmanninger
parent
310eba7156
commit
6f262afe8e
@@ -16,7 +16,7 @@ Description
|
||||
|
||||
``if`` will execute the command ``CONDITION``. If the condition's exit status is 0, the commands ``COMMANDS_TRUE`` will execute. If the exit status is not 0 and :doc:`else <else>` is given, ``COMMANDS_FALSE`` will be executed.
|
||||
|
||||
You can use :doc:`and <and>` or :doc:`or <or>` in the condition. See the second example below.
|
||||
You can use :doc:`not <not>`, :doc:`and <and>` or :doc:`or <or>` in the condition. See the second example below.
|
||||
|
||||
The exit status of the last foreground command to exit can always be accessed using the :ref:`$status <variables-status>` variable.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user