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

Re: uninvited members of associative array



Bart Schaefer wrote on Sat, Dec 17, 2022 at 14:10:32 -0800:
> On Sat, Dec 17, 2022 at 1:52 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> >
> > Too bad it's not created as the same type as the input.
> 
> The input doesn't have a type.  It's the result of a substitution, so
> it's just a series of separate words.  Where the words came from is
> not remembered.  Consider:
> 
> set -A thing new1 new2 "${(@kv)whatever}" new3 new4
> 
> What "type" is that?
> 

Also consider:

[[[
cd "$(mktemp -d)"        # create a new, empty directory and cd into it
touch -- -l foo
wc *
]]]

What will that print?




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