From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7151 invoked by alias); 2 Oct 2012 14:07:13 -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: 17306 Received: (qmail 28094 invoked from network); 2 Oct 2012 14:07:12 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <121002070643.ZM28769@torch.brasslantern.com> Date: Tue, 02 Oct 2012 07:06:43 -0700 In-reply-to: Comments: In reply to Larry Schrof "Bug / error in manpage." (Oct 1, 6:08pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "zsh-users@zsh.org" Subject: Re: Bug / error in manpage. MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Oct 1, 6:08pm, Larry Schrof wrote: } } The man page for subscripting flags is incorrect. Here is the excerpt: } } 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. } } 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.