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

Re: Belaboring substitution syntax




On 2022-11-15 22:26, Bart Schaefer wrote:

That's almost always the instance in which you want to use
"${array[@]}" or the almost-equivalent "${(@)array}".  The difference
is that you can [sometimes must] use (@) on a nested expansion
"${(@)${somethingthatcreatesanarray}}".

Sheesh, that's a new one again.  I'll add that to my list of potential expand/protect/join/split/slice/don't-slice/compact/don't-compact candidate syntaxes.  How you guys can possibly parse all this is too scary to even think about.  Still:

"${array[@]}" ... Read: protect the elements of this array, do any expansions within them, but do NOT combine them ??





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