From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18952 invoked from network); 6 Sep 1999 12:25:29 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Sep 1999 12:25:29 -0000 Received: (qmail 8810 invoked by alias); 6 Sep 1999 12:25:18 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7666 Received: (qmail 8803 invoked from network); 6 Sep 1999 12:25:17 -0000 Message-Id: <199909061225.OAA359315@hydra.ifh.de> X-Authentication-Warning: hydra.ifh.de: pws owned process doing -bs To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: strange glob expansion In-reply-to: "Adam Spiers"'s message of "Sun, 05 Sep 1999 22:07:31 MET DST." <19990905220731.A7232@thelonious.new.ox.ac.uk> Date: Mon, 06 Sep 1999 14:25:12 +0200 From: Peter Stephenson Adam Spiers wrote: > No, I was after all Perl modules starting with `L' in the sense that I > would say that Text::Abbrev started with `T' rather than `A'. (I > later replace all `/' in the result of the expansion with `::'.) So I > did mean L**/*.pm, not **/L*.pm. However, as Bart rightly guessed, > L{*/**/*,}.pm was a load of rubbish. I actually meant L*{/**/*,}.pm. > Is there a better way of achieving this? You could try generating all of them and exclude the wrong ones (with extendedglob). It's slower because it examines directories not beginning with L (all of them), but it's a single pattern. You can stick in the ::'s at the same time. print **/*.pm~[^L]*(:gs./.::.) I can't think of a better way of doing it as a single pattern. With the other way, you might want to put (N) at the end, although having cshnullglob is a bit neater here. By the way, does anyone want a globbing flag to turn on extended glob? e.g. (#x)foo and (#X)foo would compile pattern foo with extended glob on or off. -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy