Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Odd expansion behavior
- X-seq: zsh-workers 32830
- From: Dima Kogan <dima@xxxxxxxxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxx>
- Subject: Odd expansion behavior
- Date: Thu, 03 Jul 2014 00:43:23 -0700
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=secretsauce.net; h=from:to:subject:date:message-id:mime-version:content-type; s= mesmtp; bh=9Z/k/knQHRoT+avpLyvMaamHqvw=; b=D9ejPdU9LJrOX0DF3Rgdr 64se/SyJ0N+niqV9vHfHeQehG9FeKGm7MJoLox8pq6jF2cYFhiQO/p/i1WTf2k3v 1pJsoJ8ozwSDDUgEFfMqgycL7cnuB2QZNt20fVk3Gray7OE3Mi0cxEB1sCjHboJ7 3IyeTm+PqomOCGidXNdEQU=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=from:to:subject:date:message-id :mime-version:content-type; s=smtpout; bh=9Z/k/knQHRoT+avpLyvMaa mHqvw=; b=LS3WW9GnKMf/vaCDPBbN5CreSva8RF/RWu47Acto+QlcT03FH+/7QU wVDQKEv8aB8SXDWCK/iBd8W13DfpHIlXQkDeNdr2bm+dESzPo5Ys1zboTggAvZS9 i4f4mEarPeui57fwFiW1165hbubC3wB3J4yUEFOh3B9lW+Rd7f3To=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author