Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: uninvited members of associative array
Ray Andrews wrote on Fri, 16 Dec 2022 14:13 +00:00:
> ... this is exactly the sort of thing I was talking to Lawrence about --
> not really a hard error, just some printout issue. I'll pursue that. I
> (think I) understand that AAs are very fragile creatures and as you
> demonstrate, easily confused. I'll bag it.
I think the better takeaway here is that the "default" (barest) syntax
isn't always the right one. There's any number of examples of this:
- Variable expansions, «${foo}». Scalars need to be quoted; arrays need
to be quoted and @'d; assocs need to be quoted, @'d, and (kv)'d. The
actual meaning of unquoted «${foo}» — expand to all non-null values —
isn't commonly needed.
- «ls *.txt» without a «--» guard.
- «print -- $foo» without «-r».
Messages sorted by:
Reverse Date,
Date,
Thread,
Author