How to partially disable the zsh's autocorrect
You can inform zsh that it should not autocorrect on specific commands by aliasing them with the prefix 'nocorrect' in your .zshrc (example here: http://dzen.geekmode.org/wiki/wiki.cgi/-main/ZshConfiguration):
alias vim='nocorrect vim'
Alternatively -- if this whitelisting process becomes too frustrating -- you can switch autocorrect off entirely with the following in your .zshrc.
For newer versions of zsh use:
unsetopt correct
for older versions of zsh use:
unsetopt correct-all
Amended to add: here is a previous discussion on this subject - Exceptions to zsh correctall feature?
I think I found a better answer to this.
Im not sure about versions and whatnot, but it seems correct_all
is supposed to correct commands and arguments, while correct
corrects only commands, therefore eliminating this annoying behaviour.
This is what I have in my config files
unsetopt correct_all
setopt correct
I had the problem when using rspec
via zeus
, and I'd like to keep auto-correct settings as they seem to work for everything else except rspec
, so I never tried any of the other suggestions above.
What I had to do was nocorrect
zeus itself :
alias zeus='nocorrect zeus'