about summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-01-28 18:22:36 -0800
committerBart Schaefer <schaefer@zsh.org>2024-01-28 18:22:36 -0800
commit18400b68e49b242da55ca3a465ea496d26f47938 (patch)
tree7ecd02834aad9b5b91ae5f7bda4fed4514ae8a19 /Doc/Zsh
parentd7cf4f25ebe2ec00b5e557e8202d74fa86a36062 (diff)
downloadzsh-18400b68e49b242da55ca3a465ea496d26f47938.tar.gz
zsh-18400b68e49b242da55ca3a465ea496d26f47938.tar.xz
zsh-18400b68e49b242da55ca3a465ea496d26f47938.zip
52510: document how ${ ... } et al. affect use of "private"; add index entries
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/expn.yo3
-rw-r--r--Doc/Zsh/mod_private.yo3
2 files changed, 6 insertions, 0 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index e5506d469..2acfd08c9 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -1915,6 +1915,9 @@ from the final replacement in this case, and it is subject to filename
 generation in the same way as `tt($LPAR())...tt(RPAR())' but is em(not)
 split on tt(IFS) unless the tt(SH_WORD_SPLIT) option is set.
 
+cindex(substitution, command, current shell)
+cindex(substitution, command, non forking)
+cindex(substitution, nofork)
 Substitutions of the form `tt(${|)var(param)tt(|)...tt(})' are similar,
 except that the substitution is replaced by the value of the parameter
 named by var(param).  No implicit save or restore applies to var(param)
diff --git a/Doc/Zsh/mod_private.yo b/Doc/Zsh/mod_private.yo
index 184fa2be8..69a5f58be 100644
--- a/Doc/Zsh/mod_private.yo
+++ b/Doc/Zsh/mod_private.yo
@@ -84,6 +84,9 @@ 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(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.)
 enditemize()
 
 Note that this differs from the static scope defined by compiled languages