From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5572 invoked by alias); 2 Oct 2012 20:00:30 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17310 Received: (qmail 219 invoked from network); 2 Oct 2012 20:00:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 74.125.83.43 is neither permitted nor denied by SPF record at ntlworld.com) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-proxyuser-ip:date:from:to:subject:message-id:in-reply-to :references:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=KEllVFqxfMLH1w0XabBoAWIGrw465f0Ltlo580xgpHo=; b=Ld0W8MrshRdLBxh9/yWwxe6UoutOkLwZAwhtAaXrInz3vPxZxUW0BY3D2ih8SzULaS ai3/vfMwEAHeEunuhdalH7KcGNgeQvP4rF/68g9sD0wHZ8XhtHEThOJDbgfv2g48x/NZ 3l7SCo/N5FwwgpGtyQm2HAeNd1mfqQ/CRCngH/UP1+E72888E0vmOqsqrRJKc90UCQyw Ii4SvPc/sFZ2QZCSulvRkiE2kjCHogviwVqREI5A50BV3RCTw3j4jCfYL3VeV1V0rwMR jPxn1FA6mbDxj0ccMCxccVaikEGu+feSRD5OemUkCs/QAepuQ2ppdYLJ4OA3Dw2CYMxt BOmA== X-ProxyUser-IP: 82.8.55.192 Date: Tue, 2 Oct 2012 21:00:18 +0100 From: Peter Stephenson To: "zsh-users@zsh.org" Subject: Re: Bug / error in manpage. Message-ID: <20121002210018.0a4e4c39@pws-pc.ntlworld.com> In-Reply-To: References: <20121002193526.264715c0@pws-pc.ntlworld.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlj0RwnHZ5JiVe7vXtFUcVMRpeHPebs5JN9I4ejQtVG+2Oeg5gwdLRMkjVqrxn4PVfqE417 On Tue, 2 Oct 2012 18:39:31 +0000 Larry Schrof wrote: > Agreed - I was thinking it was probably a matter of time before one of you > came > up with a good example. > > Are you thinking mentioning angle-brackets needing special quoting, or are > you thinking about just removing mention of them from that section of > the manpage? I was going to mention the problem... Index: Doc/Zsh/params.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/params.yo,v retrieving revision 1.71 diff -p -u -r1.71 params.yo --- Doc/Zsh/params.yo 21 Sep 2012 12:45:27 -0000 1.71 +++ Doc/Zsh/params.yo 2 Oct 2012 19:59:27 -0000 @@ -182,7 +182,10 @@ to the matching closing one is considere The flags tt(s), tt(n) and tt(b) take an argument; the delimiter is shown below as `tt(:)', but any character, or the matching pairs `tt(LPAR())...tt(RPAR())', `tt({)...tt(})', `tt([)...tt(])', or -`tt(<)...tt(>)', may be used. +`tt(<)...tt(>)', may be used, but note that `tt(<)...tt(>)' can only be +used if the subscript is inside a double quoted expression or a +parameter substitution enclosed in braces as otherwise the expression is +interpreted as a redirection. The flags currently understood are: Index: Src/lex.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/lex.c,v retrieving revision 1.71 diff -p -u -r1.71 lex.c --- Src/lex.c 2 Oct 2012 12:46:46 -0000 1.71 +++ Src/lex.c 2 Oct 2012 19:59:27 -0000 @@ -1218,7 +1218,7 @@ gettokstr(int c, int sub) c = Comma; break; case LX2_OUTANG: - if (in_brace_param || sub || brct) + if (in_brace_param || sub) break; e = hgetc(); if (e != '(') { @@ -1255,7 +1255,7 @@ gettokstr(int c, int sub) break; } lexstop = 0; - if (in_brace_param || sub || brct) + if (in_brace_param || sub) break; goto brk; case LX2_EQUALS: Index: Test/A04redirect.ztst =================================================================== RCS file: /cvsroot/zsh/zsh/Test/A04redirect.ztst,v retrieving revision 1.23 diff -p -u -r1.23 A04redirect.ztst --- Test/A04redirect.ztst 8 Dec 2011 15:55:11 -0000 1.23 +++ Test/A04redirect.ztst 2 Oct 2012 19:59:27 -0000 @@ -441,3 +441,6 @@ 0:failed assignment on non-posix-special, POSIX_BUILTINS >output ?zsh: read-only variable: foo + + ["; do - eval 'print ${string[(ws'$delims[1]'+'$delims[2]')2]}' - eval 'print $string[(ws'$delims[1]'+'$delims[2]')3]' - eval 'print "$string[(ws'$delims[1]'+'$delims[2]')4]"' - done -0:Check matched delimiters in subscripts ->like ->a ->dome ->like ->a ->dome ->like ->a ->dome ->like ->a ->dome -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/