diff options
author | Bart Schaefer <schaefer@zsh.org> | 2023-02-12 11:32:11 -0800 |
---|---|---|
committer | Bart Schaefer <schaefer@zsh.org> | 2023-02-12 11:32:11 -0800 |
commit | e807ac1157015581c1466407cbe722179244be37 (patch) | |
tree | 8f0b98789158d62da6feee7bf9bacffb5c1329b4 /Doc/Zsh/builtins.yo | |
parent | 3e55a135c10d3582af22a3e6dc616f57ea212df8 (diff) | |
download | zsh-e807ac1157015581c1466407cbe722179244be37.tar.gz zsh-e807ac1157015581c1466407cbe722179244be37.tar.xz zsh-e807ac1157015581c1466407cbe722179244be37.zip |
51375: Clarify documentation, fix typos, add indexing.
Diffstat (limited to 'Doc/Zsh/builtins.yo')
-rw-r--r-- | Doc/Zsh/builtins.yo | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo index 64c47346f..97a82226b 100644 --- a/Doc/Zsh/builtins.yo +++ b/Doc/Zsh/builtins.yo @@ -2041,16 +2041,22 @@ cindex(named reference) cindex(reference, named) The flag tt(-n) creates a em(named reference) to another parameter. The second parameter need not exist at the time the reference is -created. No other attribute flags may be used in conjunction with -tt(-n). The var(name) assigned-to may not be an array element nor use +created. No attributes except tt(-g) may be used in conjunction with +tt(-n). The var(name) so created may not be an array element nor use a subscript, but the var(value) assigned may be any valid parameter -name syntax, even a subscripted array element (incuding an associative +name syntax, even a subscripted array element (including an associative array element) or an array slice, which is evaluated when the named reference is expanded. See ifzman(zmanref(zshexpn))ifnzman(noderef(Parameter Expansion)) and ifzman(zmanref(zshparam))ifnzman(noderef(Parameters)) for details of the behavior of named references. +Local function scoping rules for `tt(typeset)' do apply with `tt(-n)', +so a declaration within a function persists only until the end of the +function unless `tt(-g -n)' is specified, and any local parameter (of +any type) with the same var(name) supplants a named reference from a +surrounding scope. + If no attribute flags are given, and either no var(name) arguments are present or the flag tt(+m) is used, then each parameter name printed is preceded by a list of the attributes of that parameter (tt(array), |