From 82ff9f24f170eea7daa935fdaa09ab75a2f277ff Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sun, 18 Apr 2021 13:58:09 -0700 Subject: 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. --- Doc/Zsh/options.yo | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Doc/Zsh/options.yo') 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) )( +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) -- cgit 1.4.1