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

Re: path PATH



On Wed, Jan 25, 2023 at 9:06 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
>
> These parameters have values. The following three lines are equivalent
> (assuming that foo isn't set beforehand):
>
>     typeset foo
>     typeset foo=
>     typeset foo=""

Note in passing that if the TYPESET_TO_UNSET option is in effect, the
first of those three is not equivalent to the other two.

>     typeset -i foo

Similarly.

This exposes another case where only "typeset" can provide full information.

% typeset +m foo
integer foo
% printf "<%s>\n" $parameters[foo]
<>
%

The parameter is unset and so not in $parameters, but typeset
"remembers" that it is an integer.




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