From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: strange glob expansion
Date: Mon, 06 Sep 1999 14:25:12 +0200 [thread overview]
Message-ID: <199909061225.OAA359315@hydra.ifh.de> (raw)
In-Reply-To: "Adam Spiers"'s message of "Sun, 05 Sep 1999 22:07:31 MET DST." <19990905220731.A7232@thelonious.new.ox.ac.uk>
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 <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy
next parent reply other threads:[~1999-09-06 12:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <19990905220731.A7232@thelonious.new.ox.ac.uk>
1999-09-06 12:25 ` Peter Stephenson [this message]
1999-09-07 19:44 ` Bart Schaefer
1999-09-06 12:43 Sven Wischnowsky
1999-09-06 14:08 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199909061225.OAA359315@hydra.ifh.de \
--to=pws@ifh.de \
--cc=zsh-workers@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).