From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20223 invoked from network); 2 May 2001 09:51:17 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 May 2001 09:51:17 -0000 Received: (qmail 12340 invoked by alias); 2 May 2001 09:51:12 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14200 Received: (qmail 12328 invoked from network); 2 May 2001 09:51:11 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: order of processing in brace expansion In-Reply-To: Your message of "Sat, 28 Apr 2001 06:05:04 -0000." <1010428060505.ZM29936@candle.brasslantern.com> Date: Wed, 02 May 2001 10:50:44 +0100 From: Peter Stephenson > On Apr 27, 7:09pm, Peter Stephenson wrote: > } Subject: Re: order of processing in brace expansion > } > } I would expect what you expect: the expression is interpreted the same as > } a{b,c}d. Unfortunately it isn't. The reason seems to be that the comma > } doesn't get turned back into a token. If we want to fix this, the > } following patch will do it. > > The only issue, I think, is that comma is not a token unless it is inside > braces, and we don't know at time of expanding $~foo that the surrounding > expression is eligible for brace expansion. A tokenized comma does still > match an "ordinary" comma during file globbing, but does that mean that it > always matches an ordinary comma? > > If tokenizing when it's not necessary doesn't hurt anything, then I think > we should fix the bug. ("make check" does pass with the patch applied.) I would be fairly confident about this, since there are plenty of other tokens which might be left hanging around, e.g. #'s or ~'s when EXTENDEDGLOB isn't set. These cases are all handled by a generic search for tokens which need turning back into normal characters. So I'll commit this and see. -- Peter Stephenson Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************