summaryrefslogtreecommitdiff
path: root/doc/usage/cmdline.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/usage/cmdline.rst')
-rw-r--r--doc/usage/cmdline.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/usage/cmdline.rst b/doc/usage/cmdline.rst
index 58240c5279c..79b9baf7bfe 100644
--- a/doc/usage/cmdline.rst
+++ b/doc/usage/cmdline.rst
@@ -55,6 +55,12 @@ General rules
command will cause "run" to terminate, i. e. the remaining
variables are not executed.
+#. The variable ``$?`` will be set as the return value of any command. The
+ possible values are 0 on success or 1 on any error e. g. invalid syntax or
+ failure of the command. Any exceptions to this are documented by the
+ specific command, e.g. the :doc:`for command <cmd/for>` sets ``$?`` based on
+ the last command run within the loop.
+
Representing numbers
--------------------