From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1064 invoked from network); 12 Jan 1998 17:13:04 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Jan 1998 17:13:04 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id LAA04919; Mon, 12 Jan 1998 11:58:03 -0500 (EST) Resent-Date: Mon, 12 Jan 1998 11:58:03 -0500 (EST) Message-Id: <199801121659.RAA19900@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: PATCH: zsh 3.x: <..> ranges in globbing In-reply-to: "Andrej Borsenkow"'s message of "Mon, 12 Jan 1998 19:16:55 MET." Date: Mon, 12 Jan 1998 17:59:27 +0100 From: Peter Stephenson Resent-Message-ID: <"Su6AJ.0.lC1.Qkakq"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3684 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Andrej Borsenkow wrote: > On Mon, 12 Jan 1998, Peter Stephenson wrote: > > You should probably note that <100->0foo won't match 1000foo, since > > the 1000 gets swallowed up before the shell even knows it's going > > to have to match another digit next. This is a much more difficult > > problem requiring backtracking. I could make a special case so that > > simple things like this work, but expressions like <100->(0|bar)foo would > > require much more fiddling. (Of course, <100-999>0foo works now.) > > I am not sure, that it is right thing. No, it's definitely wrong if you think in ordinary pattern matching terms (and that's just what I suggested you should do for the patch I sent). It just seems too minor to fix at the moment. It could be done by implementing the range operator as a sort of closure using the new backtracking code. -- Peter Stephenson Tel: +39 50 911239 WWW: http://www.ifh.de/~pws/ Gruppo Teorico, Dipartimento di Fisica Piazza Torricelli 2, 56100 Pisa, Italy