zsh-workers
 help / color / mirror / code / Atom feed
* [[ 0 =~ 1 || 1 = 0 ]] returns true
@ 2010-10-09 17:29 Mikael Magnusson
  2010-10-09 20:06 ` Michael Hwang
  0 siblings, 1 reply; 6+ messages in thread
From: Mikael Magnusson @ 2010-10-09 17:29 UTC (permalink / raw)
  To: zsh workers; +Cc: brandon

% [[ 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-02 23:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-09 17:29 [[ 0 =~ 1 || 1 = 0 ]] returns true Mikael Magnusson
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

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).