From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7474 invoked from network); 12 Jul 1998 16:38:42 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (203.24.36.3) by ns1.primenet.com.au with SMTP; 12 Jul 1998 16:38:42 -0000 Received: (qmail 876 invoked from network); 12 Jul 1998 16:38:13 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns2.primenet.com.au with SMTP; 12 Jul 1998 16:38:13 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA03224; Sun, 12 Jul 1998 12:25:17 -0400 (EDT) Resent-Date: Sun, 12 Jul 1998 12:25:17 -0400 (EDT) From: "Bart Schaefer" Message-Id: <980712092639.ZM28177@candle.brasslantern.com> Date: Sun, 12 Jul 1998 09:26:39 -0700 In-Reply-To: <9807081336.AA23650@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "PATCH: 4.1.4: POSIX ranges" (Jul 8, 3:36pm) References: <9807081336.AA23650@ibmth.df.unipi.it> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Peter Stephenson , zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: PATCH: 4.1.4: POSIX ranges MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"ZP-uw2.0.Go.iDEgr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4222 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 8, 3:36pm, Peter Stephenson wrote: } Subject: PATCH: 4.1.4: POSIX ranges ^ 3 } By the way, I haven't touched this, but what's happened to } nobadpattern? } } % setopt nobadpattern } % [[ [ = [ ]] } zsh: bad pattern: [ } } Is it really not supposed to work inside tests? That complains in 3.0.5, too, but does not in 3.0.0 (which doesn't care whether nobadpattern is set -- it never warns inside tests). There are 13 places in zsh that print "bad pattern". 9 of them, all in builtin.c, print a space between the word "pattern" and the following ":" (consistent, aren't we), so they aren't involved above. 3 of the others are in glob.c, the last is in options.c (in 3.0.5, it's in builtin.c). Of those 13 places, only one is preceded by "if (unset(BADPATTERN))". That one is in glob.c and follows a call to parsepat(); the other 12 all follow calls to parsereg(). The 10 cases NOT in glob.c are implementing the "-m" flag to various commands such as "setopt" (which happens to be the one that doesn't print " :"). There are 7 other uses of parsereg() that don't print a warning, but no other use of parsepat(). However, I can't figure out why 3.0.0 doesn't produce a "bad pattern" on [[ [ = [ ]]. It's calling matchpat(), just as does 3.0.5 and later, and matchpat() is one of the places in glob.c that prints the warning (this is true as far back as 3.0.0 if not farther). -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com