about summary refs log tree commit diff
path: root/Etc
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-03-04 21:07:01 -0800
committerBart Schaefer <schaefer@zsh.org>2024-03-04 21:07:01 -0800
commit610b18875ad9f4498a57e9af6903bcac3b14ff46 (patch)
tree44123f9fbd7650323f320cb81b4ed05448dd36d1 /Etc
parent05c7b21e2b30873d002b50b37e2fbd3803d4b608 (diff)
downloadzsh-610b18875ad9f4498a57e9af6903bcac3b14ff46.tar.gz
zsh-610b18875ad9f4498a57e9af6903bcac3b14ff46.tar.xz
zsh-610b18875ad9f4498a57e9af6903bcac3b14ff46.zip
52650 plus minor fixes: add -u for named references pointing to "upper" scope
Diffstat (limited to 'Etc')
-rw-r--r--Etc/FAQ.yo7
1 files changed, 7 insertions, 0 deletions
diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo
index 145ef02c9..4a86050e6 100644
--- a/Etc/FAQ.yo
+++ b/Etc/FAQ.yo
@@ -1025,6 +1025,13 @@ label(210)
     HIT:SPOT
   )
 
+  Dynamic scoping applies to named references, so for example a named
+  reference declared in global scope may be used in function scopes.
+  In ksh, local parameters have static scope, so named references in
+  zsh may have side-effects that do not occur in ksh.  To limit those
+  effects, mytt(zmodload zsh/param/private) and declare all named
+  references mytt(private).
+
   Named references may be used in zsh versions later than 5.9.
 
 sect(What is zsh's support for non-forking command substitution?)