Blog·Tanky WooABOUTRSS

Disable AutoCorrect in Zsh

09 Oct 2013

The auto-correct feature of zsh is sometimes helpful, but most time will annoy me.

Such as:

$ tankywoo::octopress/ (source*) » ls
_deploy  Gemfile  plugins  public  ...
$ tankywoo::octopress/ (source*) » rake deploy 
zsh: correct 'deploy' to '_deploy' [nyae]? 

To disable this feature, there are some ways.

Disable autocorrect on specific command

alias rake='nocorrect rake'

nocorrect is a precommand modifier that prevents a spell check on any following words.

Disable autocorrect entirely

For newer versions of zsh:

unsetopt correct

For older version of zsh:

unsetopt correct-all

Use oh-my-zsh

The newer version of oh-my-zsh can control this feature:

# Uncomment following line if you want to disable autosetting terminal title.       
# DISABLE_AUTO_TITLE="true"

default is enable, uncomment it and disable autocorrect feature.

References