playing with IFS

Ray Andrews <[email protected]> Sun, 12 Apr 2026 14:41:01 -0700
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>
Trying to optimize some code:

% output=( ${(f) "$( print -rl $output | sed [cut] )" } )

... replace with hear document:

OLDIFS=$IFS; IFS=$'\n'
% output=( $( sed [cut]' <<< $output ) )
IFS=$OLDIFS

... probably better, but it won't work without tinkering with IFS.  Can 
that be avoided?  I expect that the '<<<' mechanism might be unable to 
match the tuning of print with those options set, but perhaps there's a 
way.  Anyway, nice to avoid the pipe.