Permalink
Browse files

Add a configuration option to disable autocorrect

  • Loading branch information...
1 parent d05b201 commit 682961e9304c6bf7bd500d741b01640682d35ac9 @chaos95 committed Jul 27, 2012
Showing with 16 additions and 9 deletions.
  1. +13 −9 lib/correction.zsh
  2. +3 −0 templates/zshrc.zsh-template
View
22 lib/correction.zsh
@@ -1,10 +1,14 @@
-setopt correct_all
+if [[ "$DISABLE_CORRECTION" == "true" ]]; then
+ return
+else
+ setopt correct_all
-alias man='nocorrect man'
-alias mv='nocorrect mv'
-alias mysql='nocorrect mysql'
-alias mkdir='nocorrect mkdir'
-alias gist='nocorrect gist'
-alias heroku='nocorrect heroku'
-alias ebuild='nocorrect ebuild'
-alias hpodder='nocorrect hpodder'
+ alias man='nocorrect man'
+ alias mv='nocorrect mv'
+ alias mysql='nocorrect mysql'
+ alias mkdir='nocorrect mkdir'
+ alias gist='nocorrect gist'
+ alias heroku='nocorrect heroku'
+ alias ebuild='nocorrect ebuild'
+ alias hpodder='nocorrect hpodder'
+fi
View
3 templates/zshrc.zsh-template
@@ -23,6 +23,9 @@ ZSH_THEME="robbyrussell"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
+# Uncomment following line if you want to disable command autocorrection
+# DISABLE_CORRECTION="true"
+
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"

0 comments on commit 682961e

Please sign in to comment.