From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id BAA14132 for ; Sat, 8 Jul 1995 01:56:30 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA24719 (5.65c/Gatech-10.0-IDA for ); Fri, 7 Jul 1995 11:48:37 -0400 Received: by math (5.x/SMI-SVR4) id AA25773; Fri, 7 Jul 1995 11:45:36 -0400 Resent-Date: Fri, 7 Jul 1995 17:44:07 +0100 (MET DST) Old-Return-Path: From: hzoli@cs.elte.hu (Zoltan Hidvegi) Message-Id: <9507071544.AA16295@turan.elte.hu> Subject: Re: Expansion bug? To: cjh@ebt.com (Chris Hillery) Date: Fri, 7 Jul 1995 17:44:07 +0100 (MET DST) Cc: zsh-workers@math.gatech.edu (zsh-workers) In-Reply-To: <9507061836.AA03638@spot.EBT.COM> from "Chris Hillery" at Jul 6, 95 02:36:47 pm X-Mailer: ELM [version 2.4 PL21] Content-Type: text Resent-Message-Id: <"WnldL3.0.dI6.VQL_l"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/175 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Chris Hillery wrote: > > 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 The proper way to do this in recent zsh releases is set -A cdpatch $ROOT/{$PROJ,${^PROJ_LIST}}/src However your original method probably still works if glob_subst is set (I haven't tried). There was a bugfix which changed that. In early zsh versions ${(s:,:)foo} did not split foo at commas as this comma here become a comma token which is not the same as a comma character. That's why your method worked in early versions: brace expansion needs a comma token. And if glob_subst is set, the result of substitution is tokenized. Cheers, Zoltan