about summary refs log tree commit diff
path: root/Doc/Zsh/options.yo
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@ipost.com>2021-04-18 13:58:09 -0700
committerBart Schaefer <schaefer@ipost.com>2021-04-18 13:58:09 -0700
commit82ff9f24f170eea7daa935fdaa09ab75a2f277ff (patch)
treecef3fef19fbe032466fcfbe50b7b6aa0878300a5 /Doc/Zsh/options.yo
parent56ccb4a975bc87dd10bbbd6a1cfc296d6e2203b4 (diff)
downloadzsh-82ff9f24f170eea7daa935fdaa09ab75a2f277ff.tar.gz
zsh-82ff9f24f170eea7daa935fdaa09ab75a2f277ff.tar.xz
zsh-82ff9f24f170eea7daa935fdaa09ab75a2f277ff.zip
48560: add TYPESET_TO_UNSET option to remove initialization of parameters
Changes typeset such that ${newparam-notset} yields "notset" and
"typeset -p newparam" does not show an assignment to the parameter.  This
is similar to the default behavior of bash and ksh, with minor differences
in typeset output.

Also add tests for some POSIX incompatibilities plus minor changes for test
harness robustness.
Diffstat (limited to 'Doc/Zsh/options.yo')
-rw-r--r--Doc/Zsh/options.yo10
1 files changed, 10 insertions, 0 deletions
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)