Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: BUG: Initializations of named references with an empty string should trigger an error



On Sun, May 25, 2025, at 5:52 PM, Philippe Altherr wrote:
> We could add a new "typeset" option -R (reset) that would implicitly 
> unset the variable before executing the "typeset".
>
> Even when TYPESET_TO_UNSET is disabled, -R is also somewhat useful for 
> other variables than named references. For example, "typeset -R 
> -$var_type $var_name" is more general than "typeset -$var_type 
> $var_name=". The latter doesn't work for arrays.

typeset already uses -R for something else.

-- 
vq




Messages sorted by: Reverse Date, Date, Thread, Author