From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9486 invoked by alias); 2 Oct 2012 17:40:28 -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: 17307 Received: (qmail 22829 invoked from network); 2 Oct 2012 17:40:26 -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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf-00082601.pphosted.com designates 67.231.145.42 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=facebook; bh=/2KsugOranjzn05IX9ay56HFdWlAr8irOC/sb+b1B+k=; b=JmrLv8lLOP9H7xey/Zq35mqx5S/aJUv7m2I9r8pMY6ICsOqCCAd7bmAqGc/bj2ATlUnj w/i0tvme3TxLd8oJ1AbfFSSBPRRslejXFOR04B8bx8qIwBBBR8GEeqrqh6DlGCzJJJrg Y+UdNHwKUjOKcf6EMtIcd07oxswVBrnUTAs= From: Larry Schrof To: Bart Schaefer , "zsh-users@zsh.org" Subject: Re: Bug / error in manpage. Thread-Topic: Bug / error in manpage. Thread-Index: AQHNn//GKajF7pQVzUGqlU64C195lJemg6aA///GVAA= Date: Tue, 2 Oct 2012 17:40:20 +0000 Message-ID: In-Reply-To: <121002070643.ZM28769@torch.brasslantern.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [192.168.18.254] Content-Type: text/plain; charset="us-ascii" Content-ID: <01A543864C0CD147B0275BB8F853070E@fb.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Spam-Reason: safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.7.7855,1.0.431,0.0.0000 definitions=2012-10-02_04:2012-10-02,2012-10-02,1970-01-01 signatures=0 Thanks much for taking a look into it and the prompt patch! On 10/2/12 7:06 AM, "Bart Schaefer" wrote: >On Oct 1, 6:08pm, Larry Schrof wrote: >} >} The man page for subscripting flags is incorrect. Here is the excerpt: >}=20 >} The flags s, n and b take an argument; the delimiter is shown >below as >} `:', but any character, or the matching pairs `(...)', >`{...}', >} `[...]', or `<...>', may be used. >}=20 >} The '< >' brackets do not work as separators: >} zsh% print $string[(ws<:>)2] >} zsh: parse error near `)' >} zsh% > >I see PWS has made a patch, but I just wanted to point out that the man >page was NOT incorrect before. > >It works if you quote it: > >torch% print "$string[(ws<:>)2]" >* > >What PWS's patch does, in effect, is arrange that [ ] will quote the >redirection operators so you no longer need to explicitly quote them in >that particular context. This is probably breaking some rule or other >of POSIX shell syntax but I can't immediately come up with any example >where it will matter.