Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
playing with IFS
- X-seq: zsh-users 30537
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: playing with IFS
- Date: Sun, 12 Apr 2026 14:41:01 -0700
- Archived-at: <https://zsh.org/users/30537>
- List-id: <zsh-users.zsh.org>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author