1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-05-20 23:41:27 +02:00

52510: document how ${ ... } et al. affect use of "private"; add index entries

This commit is contained in:
Bart Schaefer 2024-01-28 18:22:36 -08:00
parent d7cf4f25eb
commit 18400b68e4
3 changed files with 9 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2024-01-28 Bart Schaefer <schaefer@zsh.org>
* 52510: Doc/Zsh/expn.yo, Doc/Zsh/mod_private.yo: document how
${ ... } et al. affect use of "private"; add index entries
* 52509: configure.ac, Src/utils.c: manage internals of stdio
objects when performing redirections.

View file

@ -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)

View file

@ -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