blob: 769223c4775bf2c08a1a3aa730d1c3e7e52bf357 [file] [log] [blame]
Heinrich Schuchardt172279a2021-01-20 12:14:01 +01001exit command
2============
3
4Synopsis
5--------
6
7::
8
9 exit
10
11Description
12-----------
13
14The exit command terminates a script started via the run or source command.
15If scripts are nested, only the innermost script is left.
16
17::
18
19 => setenv inner 'echo entry inner; exit; echo inner done'
20 => setenv outer 'echo entry outer; run inner; echo outer done'
21 => run outer
22 entry outer
23 entry inner
24 outer done
25 =>
26
27When executed outside a script a warning is written. Following commands are not
28executed.
29
30::
31
32 => echo first; exit; echo last
33 first
34 exit not allowed from main input shell.
35 =>
36
37Return value
38------------
39
40$? is always set to 0 (true).