zsh-users
 help / color / mirror / code / Atom feed
* z flag in parameter expansion doesn't use $IFS ?
@ 2012-10-18 22:18 Han Pingtian
  2012-10-19  8:26 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Han Pingtian @ 2012-10-18 22:18 UTC (permalink / raw)
  To: zsh-user

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-19  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18 22:18 z flag in parameter expansion doesn't use $IFS ? Han Pingtian
2012-10-19  8:26 ` Peter Stephenson
2012-10-19  8:53   ` Han Pingtian

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).