I am using Mac OS Big Sur 11.4 and recently switched to zsh, but I got some trouble using wildcard in it. Suppose I have a directory with files
1 2 3 1file 2file file1 file2 file3 and I want to list the files not starting with numbers. In bash it works fine as follows
Steves-Mac:test hengyuan$ cd test/dir3/
Steves-Mac:dir3 hengyuan$ ls
1 1file 2 2file 3 file1 file2 file3
Steves-Mac:dir3 hengyuan$ ls [[:digit:]]*
1 1file 2 2file 3
Steves-Mac:dir3 hengyuan$ ls [![:digit:]]*
file1 file2 file3
However, I got the following results in zsh
➜ dir3 ls
1 1file 2 2file 3 file1 file2 file3
➜ dir3 ls [[:digit:]]*
1 1file 2 2file 3
➜ dir3 ls [![:digit:]]*
zsh: event not found: [
Why did I get such strange results and how to fix them? Thank you.