From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2664 invoked from network); 15 May 2004 01:13:25 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?Z053fb4S5btc/1nPsQ0oQwQaawk6ntyM?@203.24.36.3) by ns1.primenet.com.au with SMTP; 15 May 2004 01:13:25 -0000 Received: (qmail 25438 invoked from network); 14 May 2004 16:13:23 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by proxy.melb.primenet.com.au with SMTP; 14 May 2004 16:13:23 -0000 Received: (qmail 18371 invoked from network); 14 May 2004 16:12:02 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 May 2004 16:12:02 -0000 Received: (qmail 10798 invoked by alias); 14 May 2004 16:11:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7455 Received: (qmail 10788 invoked from network); 14 May 2004 16:11:53 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 14 May 2004 16:11:50 -0000 Received: (qmail 17822 invoked from network); 14 May 2004 16:11:50 -0000 Received: from unknown (HELO moonbase.zanshin.com) (root@167.160.213.139) by a.mx.sunsite.dk with SMTP; 14 May 2004 16:11:23 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i4EGAclw015678; Fri, 14 May 2004 09:10:54 -0700 Date: Fri, 14 May 2004 09:10:13 -0700 (PDT) From: Bart Schaefer Sender: schaefer@toltec.zanshin.com Reply-To: Bart Schaefer To: Peter Stephenson cc: zsh-users@sunsite.dk Subject: Re: Recursive globbing In-Reply-To: <232.1084532088@csr.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.6 required=6.0 tests=NO_DNS_FOR_FROM autolearn=no version=2.63 X-Spam-Hits: 1.6 On Fri, 14 May 2004, Peter Stephenson wrote: > > Is there any difference between *.tex and **.tex ? > > No, and in fact they are documented to be the same. Hence... > > > how about having improved recursive globbing, where ** not followed > > by a slash would mean **/* (ditto for *** -> ***/*)? > > I can't see any problem with this No; please please don't do this. Consider: foo='x*' print ${~foo}* Or bar="$foo*" print $~bar Completely unexpected results. Also it seriously breaks sh compatibility, so at the very least it should be disabled when SH_GLOB or similar options are in effect. There's a reason that only **/ and not blather**/ is special.