From f082d7a245da8767a11dcc20a7e68ababefa5f34 Mon Sep 17 00:00:00 2001 From: Bob Bonifield Date: Wed, 4 Dec 2013 20:59:57 -0700 Subject: [PATCH 1/3] 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 From 152e1e07e0397ecc3f1778ea597d081c33ee8ff4 Mon Sep 17 00:00:00 2001 From: "n.st" Date: Wed, 18 Dec 2013 18:27:20 +0100 Subject: [PATCH 2/3] Cancel update if the current user doesn't have write permissions for the oh-my-zsh directory. --- tools/check_for_upgrade.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 0f8c9c391..d877e2a89 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -26,6 +26,13 @@ if [ -f ~/.zsh-update ] then . ~/.zsh-update + # cancel update if the current user doesn't have write permissions for the + # oh-my-zsh directory + if [ -n $(find -not -writable "$ZSH") ] + then + return 0; + fi + if [[ -z "$LAST_EPOCH" ]]; then _update_zsh_update && return 0; fi From a38af27991d15d14ac4ca55c919bb694d7eafb7a Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 18 Dec 2013 17:03:33 -0800 Subject: [PATCH 3/3] Revert "Cancel update if the current user doesn't have write permissions for the oh-my-zsh directory." This reverts commit 152e1e07e0397ecc3f1778ea597d081c33ee8ff4. --- tools/check_for_upgrade.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index d877e2a89..0f8c9c391 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -26,13 +26,6 @@ if [ -f ~/.zsh-update ] then . ~/.zsh-update - # cancel update if the current user doesn't have write permissions for the - # oh-my-zsh directory - if [ -n $(find -not -writable "$ZSH") ] - then - return 0; - fi - if [[ -z "$LAST_EPOCH" ]]; then _update_zsh_update && return 0; fi