ls -d *e* prints out all files containing an e somewhere in it, but the opposite does not seem to work. Why exactly is that?is it because ls takes * as its own argument and expands all the files?I understand I can do: ls -d !(*e*) (with extglob set). 
Why does `ls -d *[!e]*` display all files instead of omitting all files that contain an e?
ls
What that glob is actually doing is matching any number of characters, then a single character other than an e, then any number of characters. It will match any file with a name that isn't composed entirely of e's.