Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Expansion bug?

I don't recall seeing this mentioned before, although I've kind of
been skimming the list for some time.

In zsh2.6-beta1, I had the following statement:

  set -A cdpath $ROOT/{$PROJ,${(j:,:)PROJ_LIST}}/src

The part between braces expanded to a comma-separated list of $PROJ
and then the elements of the array $PROJ_LIST (which I turned into a
comma-separated list with the (j:,:) ).

This expanded via brace-expansion into a collection of paths like so:

 /root/project/src /root/a_proj/src /root/b_proj/src    etc.

However, when I upgraded to zsh2.6-beta10 recently, this broke. (I
hadn't upgraded between those two versions, so I'm not sure at exactly
which patch it went away.) Now it seems as though what's between the
braces gets turned into a two-element comma-separated list (even
though the second element DOES have commas in it). So I get:

 /root/project/src /root/a_proj,b_proj/src

I'm guessing that somewhere along the line the order of expansion got
inverted, so that the ${(j:,:)PROJ_LIST} doesn't get expanded until
after brace-expansion. But this does seem wrong to me - nested things
should be evaluated from the inside out.

aka Chris Hillery

Messages sorted by: Reverse Date, Date, Thread, Author