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 DAA17231 for ; Sat, 8 Jul 1995 03:24:51 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA26440 (5.65c/Gatech-10.0-IDA for ); Fri, 7 Jul 1995 13:25:07 -0400 Received: by math (5.x/SMI-SVR4) id AA28448; Fri, 7 Jul 1995 13:21:37 -0400 Resent-Date: Fri, 7 Jul 1995 13:25:50 +0500 Old-Return-Path: From: Chris Hillery Date: Fri, 7 Jul 1995 13:25:50 +0500 Message-Id: <9507071725.AA06947@spot.EBT.COM> To: hzoli@cs.elte.hu Cc: zsh-workers@math.gatech.edu In-Reply-To: <9507071544.AA16295@turan.elte.hu> (hzoli@cs.elte.hu) Subject: Re: Expansion bug? Comments: Hyperbole mail buttons accepted, v3.15. Resent-Message-Id: <"5u5Fl3.0.My6.WqM_l"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/178 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zoltan replyeth: > Chris Hillery wrote: > > set -A cdpath $ROOT/{$PROJ,${(j:,:)PROJ_LIST}}/src > > > > This expanded via brace-expansion into a collection of paths like so: > > > > /root/project/src /root/a_proj/src /root/b_proj/src etc. > > The proper way to do this in recent zsh releases is > > set -A cdpath $ROOT/{$PROJ,${^PROJ_LIST}}/src Nope, unfortunately this doesn't work either - or rather, it works TOO well. What happens in that case is that I get the value in PROJ repeated in front of every value in $PROJ_LIST, so (using my above example) cdpath turns into /root/project/src /root/proj_a/src /root/project/src /root/proj_b/src Which, as it happens, actually works fine for a cdpath; it's just redundant and inefficient. (And cdpath gets real huge real quick when $PROJ_LIST has 10 entries...) > However your original method probably still works if glob_subst is set (I > haven't tried). There was a bugfix which changed that. However, THIS works just fine - it returned the functionality I had in beta1. So far this is the only way I've found to get the behaviour I want, although Soren sent me mail showing how I could get almost the same behaviour with rcexpandparam set (it worked with the simple $ROOT/$PROJ_LIST/src case, and I had to manually prepend $ROOT/$PROJ/src). So, thanks... :) (Hopefully globsubst won't have any other unwanted side-effects...) > Cheers, > Zoltan -- Ceej aka Chris Hillery cjh@ebt.com