From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18775 invoked from network); 9 Oct 2007 15:26:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Oct 2007 15:26:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 27182 invoked from network); 9 Oct 2007 15:26:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Oct 2007 15:26:41 -0000 Received: (qmail 10565 invoked by alias); 9 Oct 2007 15:26:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23930 Received: (qmail 10553 invoked from network); 9 Oct 2007 15:26:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Oct 2007 15:26:37 -0000 Received: (qmail 26926 invoked from network); 9 Oct 2007 15:26:37 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 9 Oct 2007 15:26:30 -0000 Received: from torch.brasslantern.com ([71.116.76.59]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JPN00CSWHGFP274@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Tue, 09 Oct 2007 10:24:16 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id l99FOEBT026447 for ; Tue, 09 Oct 2007 08:24:14 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id l99FODYd026446 for zsh-workers@sunsite.dk; Tue, 09 Oct 2007 08:24:13 -0700 Date: Tue, 09 Oct 2007 08:24:13 -0700 From: Bart Schaefer Subject: Re: bug in patterns used for filename expansion (e.g. a[b/c]d) In-reply-to: <20071009141239.GA10216@prunille.vinc17.org> To: zsh-workers@sunsite.dk Message-id: <071009082413.ZM26445@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20071009124055.GH22340@prunille.vinc17.org> <200710091259.l99Cxifg025637@news01.csr.com> <20071009141239.GA10216@prunille.vinc17.org> Comments: In reply to Vincent Lefevre "Re: bug in patterns used for filename expansion (e.g. a[b/c]d)" (Oct 9, 4:12pm) On Oct 9, 4:12pm, Vincent Lefevre wrote: } Subject: Re: bug in patterns used for filename expansion (e.g. a[b/c]d) } } On 2007-10-09 13:59:44 +0100, Peter Stephenson wrote: } > As I said on the Austin group list, this isn't a bug. It's controlled } > by the option NOMATCH; you'll find that if zsh is in compatibility mode } > that option is unset. } } OK, but these compatibility modes are not really clear, e.g. which sh } and which ksh? And what about POSIX? The intent is that starting zsh as "sh" provides full POSIX compatility. However, starting zsh as "ksh" has never promised to be 100% compatible with any version of ksh; it just means that most of the behavior becomes ksh-like. Similarly "emulate csh" makes no promise that zsh will be a drop-in replacement for csh, and even when started as "sh" there is no specific other-thing-that-calls-itself-"sh" that you can point at to say "zsh works like that." That said, the thing zsh-as-ksh is most like is ksh88. } vin:~> ksh --version } zsh 4.3.4 (i686-pc-linux-gnu) } vin:~> ksh } $ ls a[b/* } ls: a[b/*: No such file or directory } } vin:~> ksh93 } $ ls a[b/* } > ksh93: syntax error: `[' unmatched This is exactly the difference between bash and ksh as mentioned on the austin-group, is it not? } vin:~> ksh -c 'ls a[b/*' } ls: a[b/*: No such file or directory } vin:~> ksh93 -c 'ls a[b/*' } ls: a[b/*[: No such file or directory Where'd that extra '[' come from? I'd say this is a ksh bug. } vin:~> touch 'a[b/*' } vin:~> ksh93 -c 'ls a[b/*' } ls: a[b/*[: No such file or directory } vin:~> ksh -c 'ls a[b/*' } a[b/* Again modulo the extra-bracket bug, this is the bash v. ksh thing.