4 ms·
> Zsh works fine with spaces and all other manner of weird whitespace, non-printable binary data, etc. > most of the problems here don't have much to do with p
by ElectricalUnion 3y ago
> Zsh works fine with spaces and all other manner of weird whitespace, non-printable binary data, etc.
> most of the problems here don't have much to do with parameter expansion
Parameter expansion is 99% of the problem here as you said youself.
Parameter expansion ends up being most of the time what other script languages would call eval, and everyone knows to avoid eval unless you really need to use it.
Excluding some really annoying bugs, almost all shells works fine for any sort of binary data. It's the user shell script that is composed of unsafe word expansions that doesn't.
It just takes someone messing with parameter expansion in zsh (SH_WORD_SPLIT) and then zsh becomes just another shell in a world of hurt again.