From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28430 invoked from network); 5 Jun 2004 20:29:20 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 5 Jun 2004 20:29:20 -0000 Received: (qmail 25964 invoked from network); 5 Jun 2004 20:29:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 5 Jun 2004 20:29:05 -0000 Received: (qmail 4233 invoked by alias); 5 Jun 2004 20:28:57 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20021 Received: (qmail 4224 invoked from network); 5 Jun 2004 20:28:56 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 5 Jun 2004 20:28:53 -0000 Received: (qmail 25560 invoked from network); 5 Jun 2004 20:28:53 -0000 Received: from moonbase.zanshin.com (root@64.84.47.139) by a.mx.sunsite.dk with SMTP; 5 Jun 2004 20:28:50 -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 i55KSlZd007320; Sat, 5 Jun 2004 13:28:47 -0700 Date: Sat, 5 Jun 2004 13:26:01 -0700 (PDT) From: Bart Schaefer To: Zsh hackers list cc: Vincent Lefevre Subject: Re: several messages In-Reply-To: <20040517150623.GG7161@ay.vinc17.org> 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=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 [Still catching up after 3 weeks out of the country.] [Vincent, I was not sure whether you're on zsh-workers, so I copied you.] On Fri, 14 May 2004, Peter Stephenson wrote: > Or how about this alternative? > > +If the option TT(EXTENDED_GLOB) is set, then tt(*#) is treated as a > +shorthand for tt(**/*), and tt(**#) and tt(*##) are treated as shorthands > +for tt(***/*). Hence tt(*#.c) matches any file ending in tt(.c) in or > +below the current directory, not following symbolic links. That's much better, though I'm wondering about those semantics for *##. I'd be more inclined to have *# == **/* and *## == */**/*, or something like that. Then **## == */***/*. On Mon, 17 May 2004, Vincent Lefevre wrote: > [I, that is, Bart, wrote:] > > foo='x*' > > print ${~foo}* > > Then there's a problem with **/ : > > foo='*' > print ${~foo}*/ Yes, you're right, but I can't travel back 14 years to stop PF from introducing **/ in the first place -- not that I'd want to, it's quite useful -- whereas I _can_ suggest that we not make the situation any worse. The really bad case is foo='*/' print *$~foo and I'm still wary of the consequences of foo='#' with extendedglob, but again it's too late to point out that there's also a reason why globbing did not use regular expression suffix-operator syntax. This suggests that perhaps ${~foo} should be treated for globbing purposes as if it had parens around it, but given arrays, the order of expansions, and other possible uses of the tilde "qualifier," there's probably no way to achieve that semantic.