From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9348 invoked from network); 5 Oct 2001 16:47:08 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 5 Oct 2001 16:47:08 -0000 Received: (qmail 21580 invoked by alias); 5 Oct 2001 16:47:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15950 Received: (qmail 21563 invoked from network); 5 Oct 2001 16:46:59 -0000 From: Bart Schaefer Message-Id: <1011005164534.ZM32624@candle.brasslantern.com> Date: Fri, 5 Oct 2001 16:45:33 +0000 In-Reply-To: <20011005172343.A2872@fysh.org> Comments: In reply to Zefram "Re: compctl -g not working" (Oct 5, 5:23pm) References: <20011002231841.B14325@astaroth.sweth.net> <1011003040449.ZM25370@candle.brasslantern.com> <20011003001256.B14675@astaroth.sweth.net> <1011003060441.ZM25764@candle.brasslantern.com> <20011003021524.A15356@astaroth.sweth.net> <1011003162422.ZM29481@candle.brasslantern.com> <20011003142330.A16765@astaroth.sweth.net> <1011004042305.ZM30162@candle.brasslantern.com> <20011004004307.C18930@astaroth.sweth.net> <1011005161336.ZM32521@candle.brasslantern.com> <20011005172343.A2872@fysh.org> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: BARE_GLOB_QUAL MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 5, 5:23pm, Zefram wrote: } } Bart Schaefer wrote: } >Should we make BARE_GLOB_QUAL a bit smarter so that it knows about } >KSH_GLOB and looks back one more character to see if what precedes the } >open-paren token is one of the ksh-glob-chars? } } With your proposed change, you'd have to think about the opposite } ambiguity too -- a set of glob qualifiers might be interpreted as part of } a pattern, and you'd sometimes need extra effort to force interpretation } as glob qualifiers. I recommend sticking with the current, simpler, rule. That sounds fine to me. In that case the doc for one or both of KSH_GLOB and BARE_GLOB_QUAL should mention this. } This is why we made the BARE_GLOB_QUAL option -- we wanted an unambiguous } syntax for glob qualifiers, that wouldn't get in the way of globbing } syntax at all. Unfortunately no one's yet come up with a really good } suggestion. Hm. We're using (#x) for various values of x to introduce things like approximate completion, case-insensitive matching, and backrefs. How about (#q...) for qualifiers? Also (#Q-) could turn off BARE_GLOB_QUAL, and (#Q+) could turn it on. (I can't decide which of those just (#Q) should do.) That would introduce the possibility of having different qualifiers for different parts of the glob pattern, e.g. `*(#qG)/*(#q.^G)' would list all plain files not owned by the current effective group that are in directories that are owned by the current effective group. Although implementation of that latter suggestion might be rather hairy. For now, all (#q...) should simply be gathered up and applied at the end as if they appeared in a single list. -- 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