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

Re: uninvited members of associative array




On 2022-12-16 14:15, Bart Schaefer wrote:

I'd appreciate a pointer to that definition, since apparently my PhD
in Computer Science is from too long ago to have covered it.

Ha!  Sometimes hairs need to be split, and Dominik is surely correct that zsh and say C are very different, but to say that zsh isn't a programing language will be a chore to sustain.

Daniel:

You mean that you wrote foo[bar] and didn't realize that was
a globbing syntax too?  zsh can't disable features because you don't
know them.

This stuff is all so fundamental that it couldn't change even if everyone wanted it to.  Disable isn't the word I chose.  But there is something very unfriendly about situations where you're doing something with an array index -- and it obvious at least to oneself that this is a string thing, and then zsh zealously applies filename expansions to it when it has nothing whatsoever to do with files.  I don't mind being clobbered, that's part of learning the shell, still it isn't very intuitive.  Anyway I've learned the protections.   But one can want to do some string globbing and still hope not to have anything to do with filenames.






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