Subject: Why zsh chose to be non-compliant in pattern matching
From: Cuong Manh Le <[email-masked]>
To: [email-masked]
Date: Fri, 26 Feb 2016 08:02:51 +0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

POSIX documentation for pattern matching (
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_13_01)
said that any quoted characters in pattern will be match literally.

AFAICT, `["!"a]` will match `!` or `a`, most of shell behave like that
except zsh (and also ksh):

case a in ["!"a]) echo 1;; esac

print nothing. While:

case b in ["!"a]) echo 1;; esac

print 1. zsh treats `["!"a]` the same as `[!a]`.

Is there any reason for this behavior?

PS: The full question can be seen here
http://unix.stackexchange.com/q/265431/38906

Thanks.