about summary refs log tree commit diff
path: root/Doc/Zsh/grammar.yo
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2014-10-01 20:36:55 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2014-10-01 20:36:55 +0100
commit5e516898d73dd797248082daefeb4147ae20fec4 (patch)
tree7e134731363266b3817bf65e063e3f4f6be6359f /Doc/Zsh/grammar.yo
parent8727049674b1f39a8926c02dc74e9f19bbd70289 (diff)
downloadzsh-5e516898d73dd797248082daefeb4147ae20fec4.tar.gz
zsh-5e516898d73dd797248082daefeb4147ae20fec4.tar.xz
zsh-5e516898d73dd797248082daefeb4147ae20fec4.zip
33312: document redirections applied to function definitions
Diffstat (limited to 'Doc/Zsh/grammar.yo')
-rw-r--r--Doc/Zsh/grammar.yo9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
index 77f0098e3..eb1edf7f8 100644
--- a/Doc/Zsh/grammar.yo
+++ b/Doc/Zsh/grammar.yo
@@ -352,6 +352,15 @@ If the option tt(SH_GLOB) is set for compatibility with other shells, then
 whitespace may appear between between the left and right parentheses when
 there is a single var(word);  otherwise, the parentheses will be treated as
 forming a globbing pattern in that case.
+
+In any of the forms above, a redirection may appear outside the
+function body, for example
+
+example(func() { ... } 2>&1)
+
+The redirection is stored with the function and applied whenever the
+function is executed.  Any variables in the redirection are expanded
+at the point the function is executed, but outside the function scope.
 )
 cindex(timing)
 findex(time)