about summary refs log tree commit diff
path: root/Doc/Zsh
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-04-13 21:30:06 -0700
committerBart Schaefer <schaefer@ipost.com>2021-04-13 21:30:06 -0700
commitf85cb4504561df0b486e3e140d4c0434516a0f7f (patch)
tree076e1c7ff63c0b59573f5f993e50b63791b7f651 /Doc/Zsh
parent0793ce4e61290d15ee7e53c15a2b8425e20c806c (diff)
parentfefd3854b4abea8b46a2ad568762d3a710af77d9 (diff)
downloadzsh-declarednull.tar.gz
zsh-declarednull.tar.xz
zsh-declarednull.zip
Merge branch 'typesettounset' into declarednull declarednull
Adds 'setopt typeset_to_unset', documentation, failure tests for POSIX incompatibilies, etc.
Diffstat (limited to 'Doc/Zsh')
-rw-r--r--Doc/Zsh/builtins.yo6
-rw-r--r--Doc/Zsh/options.yo10
2 files changed, 15 insertions, 1 deletions
diff --git a/Doc/Zsh/builtins.yo b/Doc/Zsh/builtins.yo
index a7afe42cf..61dc6986f 100644
--- a/Doc/Zsh/builtins.yo
+++ b/Doc/Zsh/builtins.yo
@@ -1872,7 +1872,11 @@ ifnzman(noderef(Local Parameters))\
 retain their special attributes when made local.
 
 For each var(name)tt(=)var(value) assignment, the parameter
-var(name) is set to var(value).
+var(name) is set to var(value).  If the assignment is omitted and var(name)
+does em(not) refer to an existing parameter, a new parameter is intialized
+to empty string, zero, or empty array (as appropriate), em(unless) the
+shell option tt(TYPESET_TO_UNSET) is set.  When that option is set,
+the parameter attributes are recorded but the parameter remains unset.
 
 If the shell option tt(TYPESET_SILENT) is not set, for each remaining
 var(name) that refers to a parameter that is already set, the name and
diff --git a/Doc/Zsh/options.yo b/Doc/Zsh/options.yo
index 714e8a1a1..6e862fae8 100644
--- a/Doc/Zsh/options.yo
+++ b/Doc/Zsh/options.yo
@@ -1942,6 +1942,16 @@ If the option is set, they will only be shown when parameters are selected
 with the `tt(-m)' option.  The option `tt(-p)' is available whether or not
 the option is set.
 )
+pindex(TYPESET_TO_UNSET)
+pindex(NO_TYPESET_TO_UNSET)
+pindex(TYPESETTOUNSET)
+pindex(NOTYPESETTOUNSET)
+item(tt(TYPESET_TO_UNSET) <K> <S>)(
+When declaring a new parameter with any of the `tt(typeset)' family of
+related commands, the parameter remains unset unless and until a
+value is explicity assigned to it, either in the `tt(typeset)' command
+itself or as a later assignment statement.
+)
 pindex(VERBOSE)
 pindex(NO_VERBOSE)
 pindex(NOVERBOSE)