mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 13:02:01 +08:00
doc: add cross-refs between if and else commands
This commit is contained in:
parent
1f35b146de
commit
09a97528a9
|
@ -13,7 +13,7 @@ Synopsis
|
|||
Description
|
||||
-----------
|
||||
|
||||
``if`` will execute the command ``CONDITION``. If the condition's exit status is 0, the commands ``COMMANDS_TRUE`` will execute. If it is not 0 and ``else`` is given, ``COMMANDS_FALSE`` will be executed.
|
||||
:ref:`if <cmd-if>` will execute the command ``CONDITION``. If the condition's exit status is 0, the commands ``COMMANDS_TRUE`` will execute. If it is not 0 and ``else`` is given, ``COMMANDS_FALSE`` will be executed.
|
||||
|
||||
|
||||
Example
|
||||
|
|
|
@ -16,7 +16,7 @@ Synopsis
|
|||
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 ``else`` is given, ``COMMANDS_FALSE`` will be executed.
|
||||
``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 :ref:`else <cmd-else>` is given, ``COMMANDS_FALSE`` will be executed.
|
||||
|
||||
You can use :ref:`and <cmd-and>` or :ref:`or <cmd-or>` in the condition. See the second example below.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user