From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21826 invoked by alias); 2 Mar 2017 11:22:19 -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: 40693 Received: (qmail 23295 invoked from network); 2 Mar 2017 11:22:19 -0000 X-Qmail-Scanner-Diagnostics: from new1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.221):SA:0(-0.4/5.0):. Processed in 1.515901 secs); 02 Mar 2017 11:22:19 -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=-0.4 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: psprint3@fastmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.messagingengine.com designates 66.111.4.221 as permitted sender) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=CbTFJaaq1NgVPqzCLCC6g6g08e 4=; b=wR+w5XGeWrvxtGy8BYQrckch1SdA5RYW6NsTFWCaM0xixQeHGlmLfw1UDD xrC/tvF9Y3DP7jICYzSVKq9h1ZXqedzZ9BZ9c0XZgay3SgV9jmIiGXD4+m+dz7hd Xw0LqcauRjBCiqASj0rf8e2T2JwkmJ5LpiiH+vufF6j2n7Slo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=smtpout; bh=Cb TFJaaq1NgVPqzCLCC6g6g08e4=; b=es5d4VSDMH7vsV6XTS5aWR2UYijrSl9mnQ mBtH2L2YobQmcC5E8JqyGZPig6xC5DcJgR7lutKYbwDCPSd/LNkYrkBTXnrrLzh+ Cq1Ywn47zD0ndm090Z3AC7W2jarY8/uQTYCL/9y/Znn3pYCSrti3xxrqcxAQ81+6 w/XcEt3RA= X-ME-Sender: Message-Id: <1488453733.41855.897947392.73E9E4B0@webmail.messagingengine.com> From: Sebastian Gniazdowski To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-715c2c0c References: <1488440005.4187177.897775384.2538F781@webmail.messagingengine.com> <20170302104710.6eed8ece@pwslap01u.europe.root.pri> In-Reply-To: <20170302104710.6eed8ece@pwslap01u.europe.root.pri> Subject: Re: [^ax-y] doesn't work but [^x-ya] does Date: Thu, 02 Mar 2017 03:22:13 -0800 On Thu, Mar 2, 2017, at 02:47 AM, Peter Stephenson wrote: > Isn't the same problem showing up here? Watch closely, I may be missing > the point... (...) > % print ${value//[${foo}b-z]/x} > xc > > Oops, should be a combination of the above effects, giving xx, which is > what you get if you expand the ${foo} by hand... Yes exactly. With the addition that following works: # print ${value//[b-z${foo}]/x} xx > Unfortunately tracking down where this came in isn't much help as we > need to be able to get the correct overall effect of either Dash or > literal '-' in all cases, rather than just moving the problem around. Looked at code few times when debugging, had an unexamined impression that sister variable of "seen_brct" is needed: - if (!in_brace_param) - in_brace_param = bct; + if (!in_brace_param) { + if ((in_brace_param = bct)) + seen_brct = 0; + } if resetting seen_brct helps in one case but harms other one. Raw thought, tokenization is a single-"thread" process, this might be just absurd. -- Sebastian Gniazdowski psprint3@fastmail.com