Should zsh users ever want that behavior they can enable it globally with the SH_WORD_SPLIT option, or more sensibly local to a given parameter with the = parameter expansion as in ${=var}. Also, it has the best comment in zsh's manpage: "SH_WORD_SPLIT [...] Note that this option has nothing to do with word splitting."
$ x='name with spaces.mp3'
$ print -l -- $=x # "print -l" displays one element per line
name
with
spaces.mp3
> it silently removes empty stringsYou can keep the empty strings too if needed, but it requires using the @ expansion flag as in ${(@)arr}. It all becomes superbly readable, here I'll prove it:
$ arr=($x '' 'old file')
$ print -l -- "${(@D)arr:A:gs/old/new/}"
~/Desktop/name with spaces.mp3
~/Desktop/new file
In all seriousness, the zsh default handling feels right for interactive usage in this case. I'd love the strictness of oil, so that I simply don't need to remember these things. Not yet quite ready to give up on the zshexpn(1) goodies though.