]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
doc: describe exit command
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Wed, 20 Jan 2021 11:14:01 +0000 (12:14 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 25 Jan 2021 00:15:33 +0000 (01:15 +0100)
Man-page for exit shell command.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
doc/usage/exit.rst [new file with mode: 0644]
doc/usage/index.rst

diff --git a/doc/usage/exit.rst b/doc/usage/exit.rst
new file mode 100644 (file)
index 0000000..769223c
--- /dev/null
@@ -0,0 +1,40 @@
+exit command
+============
+
+Synopsis
+--------
+
+::
+
+    exit
+
+Description
+-----------
+
+The exit command terminates a script started via the run or source command.
+If scripts are nested, only the innermost script is left.
+
+::
+
+    => setenv inner 'echo entry inner; exit; echo inner done'
+    => setenv outer 'echo entry outer; run inner; echo outer done'
+    => run outer
+    entry outer
+    entry inner
+    outer done
+    =>
+
+When executed outside a script a warning is written. Following commands are not
+executed.
+
+::
+
+    => echo first; exit; echo last
+    first
+    exit not allowed from main input shell.
+    =>
+
+Return value
+------------
+
+$? is always set to 0 (true).
index eedcdb110beef474da00aa2c8e7f619249447251..b8f216b7132add68d23743133a54ea9dd3ca07f2 100644 (file)
@@ -17,6 +17,7 @@ Shell commands
    bootefi
    bootmenu
    button
+   exit
    mbr
    pstore
    sbi