summaryrefslogtreecommitdiff
path: root/Doc/Zsh/expn.yo
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2023-11-23 13:23:55 -0800
committerBart Schaefer <schaefer@zsh.org>2023-11-23 13:23:55 -0800
commitfbec213cc5ab0d0316c98bd9ddb883bae3bbdbc5 (patch)
treee6ea125a6b117e989b7b990b9f8d96ad2b2013b5 /Doc/Zsh/expn.yo
parent7a84713bb7a1527d4ef9bfa8c745d1bfa7da9d59 (diff)
downloadzsh-fbec213cc5ab0d0316c98bd9ddb883bae3bbdbc5.tar.gz
zsh-fbec213cc5ab0d0316c98bd9ddb883bae3bbdbc5.zip
52325: Clarify doc for edge cases of named references and nofork substitution
Unposted whitespace change avoids a parse error in ${ ... } with comments.
Diffstat (limited to 'Doc/Zsh/expn.yo')
-rw-r--r--Doc/Zsh/expn.yo8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/Zsh/expn.yo b/Doc/Zsh/expn.yo
index 837a85db6..e5506d469 100644
--- a/Doc/Zsh/expn.yo
+++ b/Doc/Zsh/expn.yo
@@ -1600,6 +1600,10 @@ example(tt(before local: OUTER)
tt(by reference: OUTER)
tt(after func: RESULT))
+Note, however, that named references to em(special) parameters acquire
+the behavior of the special parameter, regardless of the scope where
+the reference is declared.
+
When var(rname) includes an array subscript, the subscript expression
is interpreted at the time tt(${)var(pname)tt(}) is expanded. Any
form of subscript is allowed, including those that select individual
@@ -1929,7 +1933,9 @@ Note that because the `tt(${|)...tt(})' and `tt(${ )...tt( })' forms
must be parsed at once as both string tokens and commands, all other
braces (`tt({)' or `tt(})') within the command either must be quoted,
or must appear in syntactically valid pairs, such as around complex
-commands, function bodies, or parameter references.
+commands, function bodies, or parameter references. Furthermore,
+comments are always recognized, even when tt(NO_INTERACTIVE_COMMENTS)
+is in effect.
texinode(Arithmetic Expansion)(Brace Expansion)(Command Substitution)(Expansion)
sect(Arithmetic Expansion)