summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/correction.zsh16
-rw-r--r--templates/zshrc.zsh-template3
2 files changed, 17 insertions, 2 deletions
diff --git a/lib/correction.zsh b/lib/correction.zsh
index 176ec16d5..07fbcfd36 100644
--- a/lib/correction.zsh
+++ b/lib/correction.zsh
@@ -1,2 +1,14 @@
-# correct commands, but not any arguments (correct_all would do that)
-setopt correct
+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'
+fi
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index 55980fb08..d4dded73a 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -26,6 +26,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"