From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10808 invoked by alias); 10 May 2015 18:59:44 -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: 35078 Received: (qmail 26277 invoked from network); 10 May 2015 18:59:39 -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 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=cpwVkjIi c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=INdooWzgZ42voa7kKzMA:9 a=CjuIK1q_8ugA:10 Date: Sun, 10 May 2015 19:59:35 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: PATCH: quote parameter expansion from GLOB_SUBST Message-ID: <20150510195935.0f10c8b9@ntlworld.com> In-Reply-To: <20150510160759.GC1971@tarsus.local2> References: <20150510004444.0f7d5444@ntlworld.com> <20150510160759.GC1971@tarsus.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 10 May 2015 16:07:59 +0000 Daniel Shahaf wrote: > So, overall: Thanks, I've used that. I missed out backslashing backslash. You sometimes get away with this; the amended test shows a case where you don't. pws diff --git a/Src/zsh.h b/Src/zsh.h index b2ab1df..f6e08e2 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -217,7 +217,7 @@ struct mathfunc { /* chars that need to be quoted for pattern matching */ -#define PATCHARS "#^*()|[]<>?~" +#define PATCHARS "#^*()|[]<>?~\\" /* * Types of quote. This is used in various places, so care needs diff --git a/Test/D04parameter.ztst b/Test/D04parameter.ztst index 17a59cb..d96ffb6 100644 --- a/Test/D04parameter.ztst +++ b/Test/D04parameter.ztst @@ -1700,6 +1700,6 @@ > >Four - funnychars='The qu*nk br!wan f@x j/mps o[]r the la~# ^"&;' + funnychars='The qu*nk br!wan f@x j/mps o[]r \(e la~# ^"&;' [[ $funnychars = ${~${(b)funnychars}} ]] 0:${(b)...} quoting protects from GLOB_SUBST