From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4350 invoked by alias); 29 Feb 2016 10:27:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38047 Received: (qmail 4746 invoked from network); 29 Feb 2016 10:27:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-AuditID: cbfec7f4-f79026d00000418a-19-56d41d20cefc Date: Mon, 29 Feb 2016 10:27:41 +0000 From: Peter Stephenson To: Zsh hackers list Subject: Re: Why zsh chose to be non-compliant in pattern matching Message-id: <20160229102741.6c1d5518@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrILMWRmVeSWpSXmKPExsVy+t/xa7oKslfCDA49VLc42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGQ83NjMXLOesaJzazd7AuIW9i5GTQ0LAROLF7AVQtpjEhXvr 2boYuTiEBJYySjS9mcMM4cxgknj39h0LhHOOUeL50q1MEM5ZRollH96C9bMIqEq0TdjGBmKz CRhKTN00mxHEFhHQkthx8iQTiC0s4CTx9PlFsBpeAXuJg49/gtVwCgRL/Gh5CWYLCTxglGi/ pQZi8wvoS1z9+4kJ4j57iZlXzjBC9ApK/Jh8jwXEZgaav3lbEyuELS+xec1bZog56hI37u5m n8AoPAtJyywkLbOQtCxgZF7FKJpamlxQnJSea6hXnJhbXJqXrpecn7uJERLQX3YwLj5mdYhR gINRiYf3heblMCHWxLLiytxDjBIczEoivEGSV8KEeFMSK6tSi/Lji0pzUosPMUpzsCiJ887d 9T5ESCA9sSQ1OzW1ILUIJsvEwSnVwJjze/mO9U135Y6URDsLB+8oSJIMdtkxRWbGbhlm02v3 T5hfSZ7K9n32Tf/1+zt7GNX31iz8OeuwzLvYWQe2eJ/y3ho36djdrSdLzt6OX69Zv/XTvxcn XlUddt4/SyKO70vR/2OnHZXmhXBOvWpm21XHH5gvZ7TT5Vz5dc+wos3fnSxVmjef0F6jxFKc kWioxVxUnAgAMJIeCGQCAAA= On Mon, 29 Feb 2016 17:00:28 +0700 Cuong Manh Le wrote: > The super user in U&L site post his opinion at > http://unix.stackexchange.com/a/266394/38906 > > He said that the pattern matching spec is unspecified for quoted characters > inside bracket expression. What is your opinion? He's talking about the standard, which indeed doesn't say anything about the subject. [ If an open bracket introduces a bracket expression as in XBD RE Bracket Expression, except that the character ( '!' ) shall replace the character ( '^' ) in its role in a non-matching list in the regular expression notation, it shall introduce a pattern bracket expression. A bracket expression starting with an unquoted character produces unspecified results. Otherwise, '[' shall match the character itself. There's a reference there to regular expressions, for which only backslash quoting is valid, as far as I'm aware. Zsh has supported that for quite a while. I think it's more a question of current practice. It's probably widespread enough now to be standardisable. pws