Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: RC_EXPAND_PARAM final patch
- X-seq: zsh-workers 3420
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: <hzoli@xxxxxxxxxxxx> (Zoltan T. Hidvegi), zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: RC_EXPAND_PARAM final patch
- Date: Mon, 4 Aug 1997 11:39:43 -0700
- In-reply-to: <9708041721.AA19076@xxxxxxxxxxxxxxxxxxxxxxxx>
- References: <9708041721.AA19076@xxxxxxxxxxxxxxxxxxxxxxxx>
On Aug 4, 1:21pm, (Zoltan T. Hidvegi) wrote:
} Subject: Re: RC_EXPAND_PARAM final patch
}
} belgium ~ % echo {$x,z}a
} {x y,z}a
}
} It is probably not what you would expect, although ksh behaves this way.
Actually, this is exactly what I'd expect. The $x is inside the { },
so the entire value of $x should be treated as part of the brace
expansion.
} I'm goint to change it so that the result will be 3 words:
}
} x ya za
What, then, is the result of `echo {w,$x,z}a' ? I can't imagine that
anyone would expect that to be the same as `{w,x} {y,z}a'. Who told
zsh to put the extra } { in there?
} But this would mean an other change: ${x}{a,b} will expand to 4 words,
}
} x ya x yb
This is fine, assuming that {p,q}${x}{a,b} expands to 8 words
px ya qx ya px yb qx yb
That's how I've thought it should work all along.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author