zsh-workers
 help / color / mirror / code / Atom feed
* Expansion bug?
@ 1995-07-06  9:36 Chris Hillery
  1995-07-07 16:44 ` Zoltan Hidvegi
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Hillery @ 1995-07-06  9:36 UTC (permalink / raw)
  To: zsh-workers


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.

-- 
Ceej
aka Chris Hillery
cjh@ebt.com


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

end of thread, other threads:[~1995-07-09 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-07-06  9:36 Expansion bug? Chris Hillery
1995-07-07 16:44 ` Zoltan Hidvegi
1995-07-07  8:25   ` Chris Hillery
1995-07-09 17:49     ` P.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).