From 6f262afe8e2f4b0224b6ac50f2b713a9d871180b Mon Sep 17 00:00:00 2001 From: Delapouite Date: Fri, 6 Mar 2026 09:02:58 +0100 Subject: [PATCH] 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 --- doc_src/cmds/if.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_src/cmds/if.rst b/doc_src/cmds/if.rst index 78b8d922e..12029511f 100644 --- a/doc_src/cmds/if.rst +++ b/doc_src/cmds/if.rst @@ -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 ` is given, ``COMMANDS_FALSE`` will be executed. -You can use :doc:`and ` or :doc:`or ` in the condition. See the second example below. +You can use :doc:`not `, :doc:`and ` or :doc:`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 ` variable.