about summary refs log tree commit diff
path: root/Doc/Zsh/params.yo
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2023-07-26 20:15:21 -0700
committerBart Schaefer <schaefer@zsh.org>2023-07-26 20:15:21 -0700
commitbaa19d2a85758d6b6bcbcd8b78f065a3be262fb3 (patch)
treec761737950b1b241b52345e6267dc25faad2bebf /Doc/Zsh/params.yo
parent5ff23c2c6db430398b0421c61fea11e8202c281a (diff)
downloadzsh-baa19d2a85758d6b6bcbcd8b78f065a3be262fb3.tar.gz
zsh-baa19d2a85758d6b6bcbcd8b78f065a3be262fb3.tar.xz
zsh-baa19d2a85758d6b6bcbcd8b78f065a3be262fb3.zip
51945: assorted documentation improvements, bug fixes, and new test
1) Document the behavior of "typeset -n existing_var" (via Jun T. comment)
2) Prohibit "typeset -nm pattern" because, well, it's insane.  Add test.
3) Improve doc for ${(!)ref} including ${{t!)ref} (Jun T.)
4) Fix doc for how-to unset of a named ref (Jun T.)
5) Allow "typeset +r -n ref" and "typeset +r +n ref" (Jun T.)
6) Fix "typeset -r -n ref=param" to create readonly references
7) Avoid accidental removal of PM_UNSET flag (Jun T.) and update test
8) Fix "typeset -gn ref=value" and add a test for it
9) Add tests for read-only reference behavior
10) Fix infinite recursion when resolving scope of an unset local
named reference, add test.
Diffstat (limited to 'Doc/Zsh/params.yo')
-rw-r--r--Doc/Zsh/params.yo4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index e0410d673..5653b3bc9 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -672,9 +672,9 @@ of var(pname) in assignments and expansions instead assign to or
 expand var(rname).  This also applies to `tt(unset )var(pname)' and to
 most subsequent uses of `tt(typeset)' with the exception of
 `tt(typeset -n)' and `tt(typeset +n)', so to remove a named reference,
-use either `tt(unset -n )var(pname)' or one of:
+use either `tt(unset -n )var(pname)' (preferred) or one of:
 ifzman()
-example(tt(typeset -n )var(pname)
+example(tt(typeset -n )var(pname=)
 tt(typeset +n )var(pname))
 
 followed by