zsh-workers
 help / color / mirror / code / Atom feed
* Re: strange glob expansion
@ 1999-09-06 12:43 Sven Wischnowsky
  1999-09-06 14:08 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Sven Wischnowsky @ 1999-09-06 12:43 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <19990905220731.A7232@thelonious.new.ox.ac.uk>]

end of thread, other threads:[~1999-09-07 19:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-06 12:43 strange glob expansion Sven Wischnowsky
1999-09-06 14:08 ` Peter Stephenson
     [not found] <19990905220731.A7232@thelonious.new.ox.ac.uk>
1999-09-06 12:25 ` Peter Stephenson
1999-09-07 19:44   ` Bart Schaefer

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).