From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Cc: brandon@ifup.org
Subject: [[ 0 =~ 1 || 1 = 0 ]] returns true
Date: Sat, 9 Oct 2010 19:29:42 +0200 [thread overview]
Message-ID: <AANLkTi=G-8Hro4iqv_cNorbRiJCxXt-XmFifeyBNwLof@mail.gmail.com> (raw)
% [[ 1 =~ 1 && 0 = 1 ]]; echo $?
0
% [[ 1 =~ 1 || 0 = 1 ]]; echo $?
0
% [[ 1 =~ 0 || 0 = 1 ]]; echo $?
0
% [[ 1 =~ 0 || 1 = 1 ]]; echo $?
1
% [[ 1 =~ 1 || 1 = 1 ]]; echo $?
0
% [[ 1 =~ 1 && 1 = 1 ]]; echo $?
1
% [[ 1 =~ 0 && 1 = 1 ]]; echo $?
1
Something seems to be screwy with =~ and &&/||, on its own it appears fine.
--
Mikael Magnusson
next reply other threads:[~2010-10-09 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-09 17:29 Mikael Magnusson [this message]
2010-10-09 20:06 ` Michael Hwang
2010-10-09 22:17 ` Phil Pennock
2010-11-02 16:34 ` Brandon Philips
2010-11-02 20:41 ` Mikael Magnusson
2010-11-02 23:37 ` Phil Pennock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=G-8Hro4iqv_cNorbRiJCxXt-XmFifeyBNwLof@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=brandon@ifup.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).