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.