Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
z flag in parameter expansion doesn't use $IFS ?
- X-seq: zsh-users 17331
- From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- To: zsh-user <zsh-users@xxxxxxx>
- Subject: z flag in parameter expansion doesn't use $IFS ?
- Date: Fri, 19 Oct 2012 06:18:26 +0800
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hello,
It looks like the z flag of parameter expansion doesn't care what the
value of IFS is:
% zsh -c 'var="foo ''bar baz''";print -l ${(z)var}'
foo
'bar baz'
% zsh -c 'IFS=:;var="foo:''bar:baz''";print -l ${=var}'
foo
'bar
baz'
% zsh -c 'IFS=:;var="foo:''bar:baz''";print -l ${(z)var}'
foo:'bar:baz'
%
I believe z flag should regard IFS and split expansion results just like
the shell parsing. Or I'm missing something here? Please help.
Thanks in advance.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author