Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[[ 0 =~ 1 || 1 = 0 ]] returns true
- X-seq: zsh-workers 28335
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: [[ 0 =~ 1 || 1 = 0 ]] returns true
- Date: Sat, 9 Oct 2010 19:29:42 +0200
- Cc: brandon@xxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:cc:content-type; bh=lLBgOWwvPjJNTxXpK+AE6IGYH5zn3V4rK5YYtFyQ738=; b=GKrFkkIX7M9R+0b3v1aekJm1yZooyx/e1a5nvce4KnA0KEc2+3xaq42XY2VliyccPs Hd0q04qNyBtIwGUkrqnn+AUF0pnAKIa1PG/0U9L3t6UkJCjkH7TgSsYuPti/zg5jbjTe gk/YBFoFK+vAw4aCUXrbWYkc1o4ZB5LG8ELxQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=r9VNwONItEK7lZ5CKzcgagkiEPm8lWWhHC4lRr1j8/Cs4tEXcJ/kGIkFTj7dt2YNjN zJyQpl5FFx6nHsp+qeCL7jhz+Dq0++lGMR+h0SiwKo1yp4/2k1IlTx7upJ4RcbJHi+OJ thdNGTzV+SZkdk666vNYEhbpEppJHlgrERPmg=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
% [[ 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author