diff options
| author | Bob Bonifield <bobbonifield@gmail.com> | 2013-12-04 20:59:57 -0700 | 
|---|---|---|
| committer | Bob Bonifield <bobbonifield@gmail.com> | 2013-12-04 20:59:57 -0700 | 
| commit | f082d7a245da8767a11dcc20a7e68ababefa5f34 (patch) | |
| tree | 272445797f7c9fed07cace092ab6e3151924a495 /lib | |
| parent | 8c93142b13fa76290f305e21596fb850629fd80f (diff) | |
| download | zsh-f082d7a245da8767a11dcc20a7e68ababefa5f34.tar.gz zsh-f082d7a245da8767a11dcc20a7e68ababefa5f34.tar.bz2 zsh-f082d7a245da8767a11dcc20a7e68ababefa5f34.zip | |
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
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/correction.zsh | 23 | 
1 files 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 | 
