1

It seems that when used in assignments, splitting with ${(f)...} does only work when using ${var=...} (in which case the result is joined again using the first character of $IFS), but not with regular assignments:

% zsh -c 'IFS=:$IFS; printf "> %s\n" ${s=${(f)"$(echo one; echo two)"}}; print ${(t)s}'  
> one:two
scalar
% zsh -c 'IFS=:$IFS; s=${(f)"$(echo one; echo two)"}; printf "> %s\n" $s; print ${(t)s}' 
> one
two
scalar

Is this documented behavior and what are the rules?

philipp2100
  • 162
  • 1
  • 11

0 Answers0