Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: strange glob expansion
- X-seq: zsh-workers 7667
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: strange glob expansion
- Date: Mon, 6 Sep 1999 14:43:23 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Mon, 06 Sep 1999 14:25:12 +0200
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> 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.
That would then be an exception in that it is recognised even if
extendedglob is not set, right?
Hm, dunno. May make things hard to read if you are used to using
extendedglob, I think. Although it sounds like something that may be
useful, although I can't come up with an example.
However, this reminded me...
We had this discussion about allowing back-references. Personally I
don't think that just storing the matched portions in some special
array is the best way -- what if I'm really interested in the indexes
(beginning/end of matched part)?
So how about a set of globbing flags that turn on collecting
back-references, say what information we want and give the name of an
array where that information is stored? Something like `(#mparts)...'
to store the matched parts in an array named `parts', `(#pbegs:ends)...'
to store the begin-positions in an array `begs' and the end-positions
in an array `ends'. Or something like that.
I don't know enough about the matching code to know if this `turn-on-
back-references-only-when-needed' is possible and easy enough to
implement and if the effect on the normal, non-collecting processing
is small enough (in terms of execution speed).
Bye
Sven
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author