zsh-workers
 help / color / mirror / code / Atom feed
* Odd expansion behavior
@ 2014-07-03  7:43 Dima Kogan
  2014-07-03  9:12 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Dima Kogan @ 2014-07-03  7:43 UTC (permalink / raw)
  To: zsh-workers

Hi.

I'm observing something odd. It might be a bug, but I don't understand
it well-enough to call it that.

I see this:

$ x=(1 2 3); echo xxx${^x}
xxx1 xxx2 xxx3

This output makes sense. However something slightly different is strange:

$ x=(1 2 3); y=xxx${^x}; echo $y
xxx1 2 3

Here the ${^x} form turns on the RC_EXPAND_PARAM option, and it's
apparently not kicking in in the second (broken) case. Even if I setopt
it, I still don't have this working.

I asked on #zsh and osse helpfully pointed out that this can be made to
work by expressing the assignment as 'y=(xxx${^x})' instead, which does
work.

But shouldn't it work the other way as well? osse wasn't sure why the
original form wasn't working, so I'm reporting it here as a maybe-bug.

Thanks

dima


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

end of thread, other threads:[~2014-07-03 12:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03  7:43 Odd expansion behavior Dima Kogan
2014-07-03  9:12 ` Peter Stephenson
2014-07-03 12:28   ` Peter Stephenson

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