Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: What's wrong with this expression?
- X-seq: zsh-users 16505
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: "Daniel Serodio (lists)" <daniel.lists@xxxxxxxxxxxxx>
- Subject: Re: What's wrong with this expression?
- Date: Tue, 18 Oct 2011 00:19:40 -0400
- Cc: Mikael Magnusson <mikachu@xxxxxxxxx>, zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201107; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=syW6fVpjny8Co/P8Ok66RWcdI2gtLX6MvUN0CEq3CMs=; b=dlLSMnEtYG3BNRMlsqSRet1+CJtizo69qf+H5pjcZGkyWKibUkTvjCRR9yLWfEfZD7OI/4BrR3LNrribGfrMQeIfy6rizUExdRb1bhIfmNtFcniUw6xXgGC7qi06gzAjedWjlboAUDvZDJf3TIxqRSkApU/YWfYY1f7Dk9wSOQk=;
- In-reply-to: <4E9C9DB4.50104@mandic.com.br>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: "Daniel Serodio (lists)" <daniel.lists@xxxxxxxxxxxxx>, Mikael Magnusson <mikachu@xxxxxxxxx>, zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <4E9C9997.3050306@mandic.com.br> <CAHYJk3Qm8NP_ofAA=9FVhjFHTC+Ay4n5SO0X69gzKV94EjsRfw@mail.gmail.com> <4E9C9DB4.50104@mandic.com.br>
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.
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".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author