From f082d7a245da8767a11dcc20a7e68ababefa5f34 Mon Sep 17 00:00:00 2001 From: Bob Bonifield Date: Wed, 4 Dec 2013 20:59:57 -0700 Subject: [PATCH] Making auto-correction off by default - Allows for the user to turn on auto-correction using the $ENABLE_CORRECTION variable - Adds aliases regardless of variable assignment to aid users that use setopt to turn correction back on in their zshrc --- lib/correction.zsh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index 436446101..47eb83b1d 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -1,14 +1,13 @@ -if [[ "$DISABLE_CORRECTION" == "true" ]]; then - return -else +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 sudo='nocorrect sudo' + +if [[ "$ENABLE_CORRECTION" == "true" ]]; then 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 sudo='nocorrect sudo' fi