From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1991 invoked from network); 26 Aug 2001 17:37:24 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Aug 2001 17:37:24 -0000 Received: (qmail 18418 invoked by alias); 26 Aug 2001 17:37:13 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15708 Received: (qmail 18406 invoked from network); 26 Aug 2001 17:37:11 -0000 From: Bart Schaefer Message-Id: <1010826172637.ZM31172@candle.brasslantern.com> Date: Sun, 26 Aug 2001 17:26:37 +0000 In-Reply-To: Comments: In reply to Borsenkow Andrej "Re: Quoted parameter parsing glitch" (Aug 22, 10:25pm) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Borsenkow Andrej Subject: Re: Quoted parameter parsing glitch Cc: zsh-workers@sunsite.dk MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 22, 10:25pm, Borsenkow Andrej wrote: } } As I said - they must match. "${foo:-""}" is valid but "${foo:-"}" - not. The question is whether "${foo:-"}"}" is valid. Also, the PS2 prompt doesn't know about nested double quotes. This is probably what had me confused before: schaefer<502> echo "${foo:-"} dquote braceparam> Note that the prompt indicates that `}"' will end the quoting scope, but in fact you need `"}"'. The prompt should say dquote braceparam dquote> and does with the patch below. Index: Src/lex.c =================================================================== RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/lex.c,v retrieving revision 1.3 diff -c -r1.3 lex.c --- Src/lex.c 2001/04/23 15:35:41 1.3 +++ Src/lex.c 2001/08/26 17:22:15 @@ -1395,7 +1395,9 @@ break; if (bct) { add(Dnull); + cmdpush(CS_DQUOTE); err = dquote_parse('"', sub); + cmdpop(); c = Dnull; } else err = 1; -- 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