From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <36BAFF36.7B5A5154@earthling.net> Date: Fri, 05 Feb 1999 14:24:55 +0000 From: Andrew Gallagher MIME-Version: 1.0 To: zsh-users@math.gatech.edu Subject: Re: globbing for links in pathnames Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailing-List: 2104 Phil Pennock wrote: > Typing away merrily, Bart Schaefer produced the immortal words: > > D'oh! I was distracted by attempting to get globbing to happen in the > > right-side of ${x::=*(@)}, discovered that glob_assign wouldn't do it, > > and then just left it there and typed the other solution. > > Okay, why do neither the second nor third ones here work "as expected"? > > % print -l ${(A)~x::=pkgs/*(@)}given that: > pkgs/bar > pkgs/foo > % print -l ${(A)^~x::=pkgs/*(@)}/man > pkgs/*(@)/man > % print -l ${^${(A)~x::=pkgs/*(@)}}/man > pkgs/*(@)/man > % > I can't tell you "why" this happens, but it seems that "how" it happens is that the "/man" is being appended to the result of the parameter expansion before globbing takes place. Evidently, when the ~ is processed it sets a flag which allows globbing to happen further down the line, rather than forcing globbing to happen at that point. -- Andrew Gallagher http://members.tripod.com/~AndrewGallagher/id.html