diff options
author | green <green@FreeBSD.org> | 2004-04-14 15:58:50 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2004-04-14 15:58:50 +0000 |
commit | d89ed54a8b91666f1c88cbdb3ae5673d8ddea2b2 (patch) | |
tree | fb598f11c0f2b8b88e3657cfd96c9c8b976332eb /bin/sh | |
parent | 4159ce22bebd29c25d3fadfeca7df18a63618637 (diff) | |
download | FreeBSD-src-d89ed54a8b91666f1c88cbdb3ae5673d8ddea2b2.zip FreeBSD-src-d89ed54a8b91666f1c88cbdb3ae5673d8ddea2b2.tar.gz |
Document the "return" built-in better: it will exit . (sources) and
the top-level shell instance, too.
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/sh.1 | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/sh/sh.1 b/bin/sh/sh.1 index 9cfde31..3aba4cb 100644 --- a/bin/sh/sh.1 +++ b/bin/sh/sh.1 @@ -871,7 +871,8 @@ command is .Op Ar exitstatus .Ed .Pp -It terminates the currently executing function. +It terminates the current executional scope, returning from the previous +nested function, sourced script, or shell instance, in that order. The .Ic return command is implemented as a built-in command. @@ -1249,6 +1250,11 @@ command is provided for efficiency. A null command that returns a 0 (true) exit value. .It Ic \&. Ar file The commands in the specified file are read and executed by the shell. +The +.Ic return +command may be used to return to the +.Ic \&. +command's caller. If .Ar file contains any |