Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
"typeset -p" inconsistency
On Thu, Oct 20, 2022 at 7:25 PM, I wrote:
>
> > typeset -T CDPATH cdpath=( )
> > typeset -aT CDPATH cdpath=( )
>
> The first one is the (incorrect) assignment for $CDPATH.
Nobody called me out on that ... the first assignment is actually just
fine. I'm not sure how I ended up thinking that didn't work. There
is, however, a related buglet:
% setopt extendedglob
% typeset -U CDPATH
% typeset -mp '(#i)cdpath'
typeset -aT CDPATH cdpath=( )
typeset -UT CDPATH cdpath=( )
Note the -U attribute is only retained when printing the assignment
for the scalar ... which is literally correct, since it was only
asserted for the scalar, but lossy, whereas the array-ness is
preserved in both cases (as long as typeset remains a reserved word).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author