about summary refs log tree commit diff
path: root/Doc
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-02-03 12:07:14 -0800
committerBart Schaefer <schaefer@zsh.org>2024-02-03 12:07:14 -0800
commit8801665e5b241c3adac9c36b6135d057c5ab2a59 (patch)
tree84a2143d3b83d2201ab5dec00c7658eb8339fac9 /Doc
parent18400b68e49b242da55ca3a465ea496d26f47938 (diff)
downloadzsh-8801665e5b241c3adac9c36b6135d057c5ab2a59.tar.gz
zsh-8801665e5b241c3adac9c36b6135d057c5ab2a59.tar.xz
zsh-8801665e5b241c3adac9c36b6135d057c5ab2a59.zip
52513: fixes and doc for using nofork substitutions with private parameters
Also fixes a crash bug with {fd}>&N redirections and private parameters
Diffstat (limited to 'Doc')
-rw-r--r--Doc/Zsh/mod_private.yo9
1 files changed, 7 insertions, 2 deletions
diff --git a/Doc/Zsh/mod_private.yo b/Doc/Zsh/mod_private.yo
index 69a5f58be..08ac4cafe 100644
--- a/Doc/Zsh/mod_private.yo
+++ b/Doc/Zsh/mod_private.yo
@@ -84,9 +84,14 @@ created outside the local scope when it was not previously declared.)
 itemiz(An exported private remains in the environment of inner scopes but
 appears unset for the current shell in those scopes.  Generally, exporting
 private parameters should be avoided.)
+itemiz(Current shell command substitutions such as `tt(${|)...tt(})',
+`tt(${|)var(var)tt(|)...tt(})' and `tt(${ )...tt( })' may read and assign
+private parameters from the enclosing function.)
 itemiz(Declaring a private parameter in a current shell command substitution
-such as `tt(${ )...tt( })' limits the parameter to the scope of the command
-substitution, just as if the parameter were declared in a function.)
+limits that parameter to the scope of the command substitution, just as if
+the parameter were declared in a function.  This also prevents access by
+any enclosed current shell command substitutions, but other substitutions
+may use the private parameter because those have the same calling scope.)
 enditemize()
 
 Note that this differs from the static scope defined by compiled languages