zsh-users
 help / color / mirror / code / Atom feed
* shwordsplit and ksharrays will change rcexpandparam's behavior on empty array
@ 2012-09-13 13:05 Han Pingtian
  2012-09-13 15:05 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Han Pingtian @ 2012-09-13 13:05 UTC (permalink / raw)
  To: zsh-users

Hello,

I noticed that 'shwordsplit' will change the behavior of 'rcexpandparam'
on empty array:

% zsh -c 'xx=(); print foo${^xx}bar'
<empty>
% zsh -c 'setopt shwordsplit;xx=(); print foo${^xx}bar'
foobar

Not sure if this is a bug. 

And looks like 'ksharrays' can do this, too:

% zsh -c 'setopt ksharrays;xx=(); print foo${^xx}bar'
foobar

Maybe ksharrays lets the $xx evluated as a scalar, a null string, so
foo${^xx}bar is return as foobar?

Thanks.


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

end of thread, other threads:[~2012-09-13 15:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-13 13:05 shwordsplit and ksharrays will change rcexpandparam's behavior on empty array Han Pingtian
2012-09-13 15:05 ` Bart Schaefer

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).