00a190bc017283ef8ab8c725c5f9fe93f030e31e

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Oh My Zsh gets a weekly auto-updater... the future is now!

Diff

 1diff --git a/lib/misc.zsh b/lib/misc.zsh
 2index fab4be9317592511bd92c2ada7a578ebddddb98d..8d6727251a73ae3456600195a71eeb29aebdef2f 100644
 3--- a/lib/misc.zsh
 4+++ b/lib/misc.zsh
 5@@ -6,4 +6,12 @@ zle -N self-insert url-quote-magic
 6 bindkey "^[m" copy-prev-shell-word
 7 
 8 ## jobs
 9-setopt long_list_jobs
10+setopt long_list_jobs
11+
12+# Check for updates on initial load...
13+if [ "$DISABLE_AUTO_UPDATE" = "true" ]
14+then
15+  return
16+else
17+  /bin/sh $ZSH/tools/check_for_upgrade.sh
18+fi
19diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
20index b8da51428b524c482b78d1f96554f74c9db10806..787dc3d09fc6e1ab318cbf75991c5e77046393b3 100644
21--- a/templates/zshrc.zsh-template
22+++ b/templates/zshrc.zsh-template
23@@ -5,6 +5,9 @@ export ZSH=$HOME/.oh-my-zsh
24 # Look in ~/.oh-my-zsh/themes/
25 export ZSH_THEME="robbyrussell"
26 
27+# Comment this out to disable weekly auto-update checks
28+# export DISABLE_AUTO_UPDATE="false"
29+
30 source $ZSH/oh-my-zsh.sh
31 
32 # Customize to your needs...
33diff --git a/tools/upgrade.sh b/tools/upgrade.sh
34index fa07daaeaa14ba3135da502975867fdef9a2e89e..f749404e9edb0152c07e4c5f94d6f70e1c2a55fd 100644
35--- a/tools/upgrade.sh
36+++ b/tools/upgrade.sh
37@@ -1,5 +1,5 @@
38 current_path=`pwd`
39 echo "Upgrading Oh My Zsh"
40 ( cd $ZSH && git pull origin master )
41-echo "Done."
42+echo "Hooray! Oh My Zsh has been updated and/or is at the current version. \nAny new updates will be reflected when you start your next terminal session."
43 cd $current_path