From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20611 invoked from network); 30 Jun 2001 02:17:24 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Jun 2001 02:17:24 -0000 Received: (qmail 18386 invoked by alias); 30 Jun 2001 02:16:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15185 Received: (qmail 18362 invoked from network); 30 Jun 2001 02:16:26 -0000 From: "Bart Schaefer" Message-Id: <1010630021439.ZM19970@candle.brasslantern.com> Date: Sat, 30 Jun 2001 02:14:39 +0000 In-Reply-To: <20010629142215.A8431@dman.com> Comments: In reply to Clint Adams "bracket expressions and POSIX" (Jun 29, 2:22pm) References: <20010629142215.A8431@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Clint Adams , zsh-workers@sunsite.dk Subject: Re: bracket expressions and POSIX MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 29, 2:22pm, Clint Adams wrote: } Subject: bracket expressions and POSIX } } POSIX says that \ loses its special meaning within a bracket } expression for pattern matching and also that ! is the } ^ character in that context. } } So this strikes me as non-compliant: } } % emulate sh } % touch \\test abc } % echo [!a]* } zsh: event not found: a] Try it with `emulate -R sh'. Just `emulate sh' does not turn on all the POSIX shell emulation options -- in particular `banghist' is still set, and history references take precedence over glob patterns. } % echo [\!a]* } \test } % echo [\]* } []* } % echo [\\]* } \test With `emulate -R sh' I get: $ ls \test abc $ echo [!a]* \test $ echo [\!a]* <- That one is especially odd. \test $ echo [\]* []* $ echo [\\]* \test $ setopt badpattern $ echo [\]* zsh: bad pattern: []* So it appears that zsh is in fact not POSIX-compliant with respect to backslashes inside brackets, but is OK with respect to `!'. $ echo [\\!a]* \test abc -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net