zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Peter Stephenson <pws@ibmth.df.unipi.it>,
	zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: PATCH: 4.1.4: POSIX ranges
Date: Sun, 12 Jul 1998 09:26:39 -0700	[thread overview]
Message-ID: <980712092639.ZM28177@candle.brasslantern.com> (raw)
In-Reply-To: <9807081336.AA23650@ibmth.df.unipi.it>

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


      reply	other threads:[~1998-07-12 16:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-08 13:36 Peter Stephenson
1998-07-12 16:26 ` Bart Schaefer [this message]

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=980712092639.ZM28177@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@math.gatech.edu \
    /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).