From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11691 invoked by alias); 18 Oct 2011 13:08:22 -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: 16511 Received: (qmail 25012 invoked from network); 18 Oct 2011 13:08:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf.mandic.com.br designates 200.225.81.133 as permitted sender) Message-ID: <4E9D7A3C.9040605@mandic.com.br> Date: Tue, 18 Oct 2011 11:08:12 -0200 From: "Daniel Serodio (lists)" User-Agent: Postbox 2.5.3 (Macintosh/20110907) MIME-Version: 1.0 To: "Daniel Serodio (lists)" , Mikael Magnusson , zsh-users@zsh.org Subject: Re: What's wrong with this expression? References: <4E9C9997.3050306@mandic.com.br> <4E9C9DB4.50104@mandic.com.br> <20111018041939.GA52377@redoubt.spodhuis.org> In-Reply-To: <20111018041939.GA52377@redoubt.spodhuis.org> Content-Type: multipart/alternative; boundary="------------080606070103080701030705" --------------080606070103080701030705 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Phil Pennock wrote: > On 2011-10-17 at 19:27 -0200, Daniel Serodio (lists) wrote: >> Mikael Magnusson wrote: >>> On 17 October 2011 23:09, Daniel Serodio (lists) >>>> [[ "foo" ~= "x" ]]&& echo true > >> Ooops. Error copy'n'pasting. The actual line in the script that fails is: >> >> if [[ ! "${PATH}" =~ $regex ]] ; then > > See, this is why reporting the _actual_ code which causes an error > helps; or, if you want to simplify, at least test that the failure still > happens with the simplified version. Mea culpa indeed. I tried to simplify the problem but ended up complicating it. > This was a bug, fixed on 2010-10-10 and the fix included in the release > of zsh 4.3.11. The current version of zsh is 4.3.12. Negated patterns > and tests combined with&&/|| failed prior to that when using the =~ > operator. > > If you are running 4.3.11 or newer, please state which version you're > using and preferably show the minimum needed to reproduce, starting from > "zsh -f". Thanks a lot. This computer is running zsh 4.2.6, I'll try to have it updated. Regrards, Daniel Serodio --------------080606070103080701030705--