Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[[ 0 =~ 1 || 1 = 0 ]] returns true



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