Prevent autocorrection of arguments to files without disabling correctall

view story

http://unix.stackexchange.com – Using a ~/.zshrc containing only the line: setopt correctall The correction mechanism tries to correct a command argument to a file argument. This is testable using sudo in a directory with a .vim file: Last login: Mon Jan 7 11:52:25 on ttys001 charmander% sudo vim ~/.zshrc zsh: correct 'vim' to '.vim' [nyae]? % CTRL+C charmander% The argument to sudo is a command. .vim isn't executable: charmander% ls -l ~/.vim -rw-r--r-- 1 simont admin 0 7 Jan 11:57 /Users/simont/.vim I do not want to disable correctall or use alias sudo='nocorrect sudo'. Is it possible to re-order the way t (HowTos)