summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2005-09-19 15:19:21 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2005-09-19 15:19:21 +0000
commitce43e4a22c250fbaee14580b167986615455f78f (patch)
tree488f047443443dfaa91eef06b0b0d023160b08f7
parentbd678526b3360851468555fca8bb5d53fef11218 (diff)
downloadzsh-ce43e4a22c250fbaee14580b167986615455f78f.tar.gz
zsh-ce43e4a22c250fbaee14580b167986615455f78f.tar.xz
zsh-ce43e4a22c250fbaee14580b167986615455f78f.zip
unposted c.f. 21735: document return as exit in try block in script
-rw-r--r--ChangeLog6
-rw-r--r--Doc/Zsh/grammar.yo5
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d1dbf5749..06560d2fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-19  Peter Stephenson  <pws@csr.com>
+
+	* unposted, c.f. 21735: Doc/Zsh/grammar.yo: document
+	that return at the top level of a script behaves like exit
+	in a try-block.
+
 2005-09-17  Peter Stephenson  <pws@pwstephenson.fsnet.co.uk>
 
 	* 21731: Src/prompt.c, Src/Zle/zle_refresh.c: count multibyte
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index d1f3996ef..dd5da93b4 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -287,8 +287,9 @@ example({
 }
 # The error condition has been reset.)
 
-An tt(exit) command encountered in tt(try-list) does em(not) cause the
-execution of var(always-list).  Instead, the shell exits immediately
+An tt(exit) command (or a tt(return) command executed at the outermost
+function level of a script) encountered in tt(try-list) does em(not) cause
+the execution of var(always-list).  Instead, the shell exits immediately
 after any tt(EXIT) trap has been executed.
 )
 findex(function)