From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5876 invoked from network); 22 Aug 2001 17:05:39 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Aug 2001 17:05:39 -0000 Received: (qmail 16716 invoked by alias); 22 Aug 2001 17:05:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15679 Received: (qmail 16704 invoked from network); 22 Aug 2001 17:05:29 -0000 From: Bart Schaefer Message-Id: <1010822165904.ZM24041@candle.brasslantern.com> Date: Wed, 22 Aug 2001 16:59:04 +0000 In-Reply-To: <006601c12b26$73edf210$21c9ca95@mow.siemens.ru> Comments: In reply to Borsenkow Andrej "RE: Quoted parameter parsing glitch" (Aug 22, 8:21pm) References: <006601c12b26$73edf210$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: Borsenkow Andrej , zsh-workers@sunsite.dk Subject: Re: Quoted parameter parsing glitch MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 22, 8:21pm, Borsenkow Andrej wrote: } Subject: RE: Quoted parameter parsing glitch } } > schaefer<502> print "${foo:-"}" } > dquote braceparam> } > } > At this point the parser is in an infinite loop. I'm wrong, it's either more complicated than that example shows or it's just me. It's possible to get out of that one by just: schaefer<502> print "${foo:-"}" dquote braceparam> } dquote> " } schaefer<503> I'm pretty sure I did manage to get it stuck on a more complicated substitution, but my attempt to produce a minimal example went astray, and I haven't reproduced whatever it was I first did. } Shell should not hang, but please note it is invalid as per POSIX. } Double-quotes and braces must match. Zsh 4 (and ksh) is supposed to accept double-quotes inside ${...} inside double-quotes; the braces act as an extra level of quoting so that the inner quotes can nest in the outer ones. I don't know what POSIX says about that. -- 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