From 1816e957770f8e3f0ad22658f741c5f0492da982 Mon Sep 17 00:00:00 2001 From: alanpeabody Date: Thu, 26 May 2011 23:56:45 -0400 Subject: [PATCH 01/14] Added my own theme. --- themes/alanpeabody.zsh-theme | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 themes/alanpeabody.zsh-theme diff --git a/themes/alanpeabody.zsh-theme b/themes/alanpeabody.zsh-theme new file mode 100644 index 000000000..1f66f1ec3 --- /dev/null +++ b/themes/alanpeabody.zsh-theme @@ -0,0 +1,22 @@ + +local user='%{$fg[magenta]%}%n@%{$fg[magenta]%}%m%{$reset_color%}' +local pwd='%{$fg[blue]%}%~%{$reset_color%}' +local rvm='%{$fg[green]%}‹$(rvm-prompt i v g)›%{$reset_color%}' +local return_code='%(?..%{$fg[red]%}%? ↵%{$reset_color%})' +local git_branch='$(git_prompt_status)%{$reset_color%}$(git_prompt_info)%{$reset_color%}' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%} ✚" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[blue]%} ✹" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%} ✖" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" + +PROMPT="${user} ${pwd}$ " +RPROMPT="${return_code} ${git_branch} ${rvm}" + From 1c2eb40e876db3d2bfad22a0b52f0d410e1d51f3 Mon Sep 17 00:00:00 2001 From: nebirhos Date: Thu, 26 May 2011 20:00:23 +0200 Subject: [PATCH 02/14] Added nebirhos theme --- themes/nebirhos.zsh-theme | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 themes/nebirhos.zsh-theme diff --git a/themes/nebirhos.zsh-theme b/themes/nebirhos.zsh-theme new file mode 100644 index 000000000..c49df972e --- /dev/null +++ b/themes/nebirhos.zsh-theme @@ -0,0 +1,17 @@ +# Based on robbyrussell's theme, with host and rvm indicators. Example: +# @host ➜ currentdir rvm:(rubyversion@gemset) git:(branchname) + +# Get the current ruby version in use with RVM: +if [ -e ~/.rvm/bin/rvm-prompt ]; then + RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} " +fi + +# Get the host name (first 4 chars) +HOST_PROMPT_="%{$fg_bold[red]%}@$HOST[0,4] ➜ %{$fg_bold[cyan]%}%c " +GIT_PROMPT="%{$fg_bold[blue]%}\$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}" +PROMPT="$HOST_PROMPT_$RUBY_PROMPT_$GIT_PROMPT" + +ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" From 1e3b441ce7e0b8706867801c1e5e7ca6760ff17e Mon Sep 17 00:00:00 2001 From: Andrew Hodges Date: Mon, 30 May 2011 10:07:15 -0400 Subject: [PATCH 03/14] Rollback of Pull #366 sorin-ionescu had some good points. --- plugins/brew/brew.plugin.zsh | 12 ------------ plugins/node/node.plugin.zsh | 5 +---- plugins/npm/npm.plugin.zsh | 2 -- plugins/rvm/rvm.plugin.zsh | 9 ++------- 4 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 plugins/npm/npm.plugin.zsh diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index f584a4684..c2e95884e 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1,13 +1 @@ -# Move /usr/local/bin (path where brews are linked) to the front of the path -# This will allow us to override system binaries like ruby with our brews -# TODO: Do this in a more compatible way. -# What if someone doesn't have /usr/bin in their path? -export PATH=`echo $PATH | sed -e 's|/usr/local/bin||' -e 's|::|:|g'` # Remove /usr/local/bin -export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/bin:&|'` # Add it in front of /usr/bin -export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/sbin:&|'` # Add /usr/local/sbin - alias brews='brew list -1' - -function brew-link-completion { - ln -s "$(brew --prefix)/Library/Contributions/brew_zsh_completion.zsh" "$ZSH/plugins/brew/_brew.official" -} diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh index 18f35333c..519bc18da 100644 --- a/plugins/node/node.plugin.zsh +++ b/plugins/node/node.plugin.zsh @@ -1,8 +1,5 @@ -# This works if you installed node via homebrew. -export NODE_PATH="/usr/local/lib/node" - # Open the node api for your current version to the optional section. # TODO: Make the section part easier to use. -function node-api { +function node-docs { open "http://nodejs.org/docs/$(node --version)/api/all.html#$1" } diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh deleted file mode 100644 index 0b0a30e11..000000000 --- a/plugins/npm/npm.plugin.zsh +++ /dev/null @@ -1,2 +0,0 @@ -# TODO: Don't do this in such a weird way. -export PATH=`echo $PATH | sed -e 's|/usr/bin|/usr/local/share/npm/bin:&|'` diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 8a3ec788a..40fd88c1a 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -1,6 +1,5 @@ -fpath=($ZSH/plugins/rvm $fpath) -autoload -U compinit -compinit -i +# What does this really do? +# fpath=($ZSH/plugins/rvm $fpath) alias rubies='rvm list rubies' alias gemsets='rvm gemset list' @@ -35,10 +34,6 @@ function rvm-update { rvm reload # TODO: Reload rvm completion? } -function rvm-link-completion { - ln -s "$rvm_path/scripts/zsh/Completion/_rvm" "$ZSH/plugins/rvm/_rvm.official" -} - # TODO: Make this usable w/o rvm. function gems { local current_ruby=`rvm-prompt i v p` From 9801ad6453caa05925847f63401e6266378eb2de Mon Sep 17 00:00:00 2001 From: Andrew Hodges Date: Mon, 30 May 2011 11:10:08 -0400 Subject: [PATCH 04/14] Remove Uneeded Lines --- plugins/rvm/rvm.plugin.zsh | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 40fd88c1a..24621fe0b 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -1,6 +1,3 @@ -# What does this really do? -# fpath=($ZSH/plugins/rvm $fpath) - alias rubies='rvm list rubies' alias gemsets='rvm gemset list' From 93dab36fcb7f138aba32e5102c621180055d67fe Mon Sep 17 00:00:00 2001 From: Second Planet Date: Mon, 30 May 2011 19:10:26 -0400 Subject: [PATCH 05/14] added humza.zsh-theme --- themes/humza.zsh-theme | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 themes/humza.zsh-theme diff --git a/themes/humza.zsh-theme b/themes/humza.zsh-theme new file mode 100644 index 000000000..107886295 --- /dev/null +++ b/themes/humza.zsh-theme @@ -0,0 +1,26 @@ +# ZSH THEME Preview: https://skitch.com/huyy/rk979/humza.zshtheme + +let TotalBytes=0 +for Bytes in $(ls -l | grep "^-" | awk '{ print $5 }') +do + let TotalBytes=$TotalBytes+$Bytes +done + # should it say b, kb, Mb, or Gb +if [ $TotalBytes -lt 1024 ]; then + TotalSize=$(echo -e "scale=3 \n$TotalBytes \nquit" | bc) + suffix="b" +elif [ $TotalBytes -lt 1048576 ]; then + TotalSize=$(echo -e "scale=3 \n$TotalBytes/1024 \nquit" | bc) + suffix="kb" +elif [ $TotalBytes -lt 1073741824 ]; then + TotalSize=$(echo -e "scale=3 \n$TotalBytes/1048576 \nquit" | bc) + suffix="Mb" +else + TotalSize=$(echo -e "scale=3 \n$TotalBytes/1073741824 \nquit" | bc) + suffix="Gb" +fi + +PROMPT='%{$reset_color%}%n %{$fg[green]%}{%{$reset_color%}%~%{$fg[green]%}}%{$reset_color%}$(git_prompt_info) greetings, earthling %{$fg[green]%}[%{$reset_color%}%{$TotalSize%}%{$suffix%}%{$fg[green]%}]%{$fg[red]%}$%{$reset_color%} ☞ ' + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[red]%}±(" +ZSH_THEME_GIT_PROMPT_SUFFIX=");%{$reset_color%}" From f4878971752b6d76743c29d6f478d20c84755b8e Mon Sep 17 00:00:00 2001 From: Brian Riddle Date: Tue, 31 May 2011 14:16:43 +0200 Subject: [PATCH 06/14] fix double -f and corrected format. -f%m was getting called twice in the stat_cmd corrected format of stat command from y to Y. --- plugins/ant/ant.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/ant/ant.plugin.zsh b/plugins/ant/ant.plugin.zsh index 23bc7756a..691d4d2db 100644 --- a/plugins/ant/ant.plugin.zsh +++ b/plugins/ant/ant.plugin.zsh @@ -2,14 +2,14 @@ stat -f%m . > /dev/null 2>&1 if [ "$?" = 0 ]; then stat_cmd=(stat -f%m) else - stat_cmd=(stat -L --format=%y) + stat_cmd=(stat -L --format=%Y) fi _ant_does_target_list_need_generating () { if [ ! -f .ant_targets ]; then return 0; else - accurate=$($stat_cmd -f%m .ant_targets) - changed=$($stat_cmd -f%m build.xml) + accurate=$($stat_cmd .ant_targets) + changed=$($stat_cmd build.xml) return $(expr $accurate '>=' $changed) fi } From c014dca141588737a13c4e3974adb4afd58c09bb Mon Sep 17 00:00:00 2001 From: Michael Hanson Date: Tue, 31 May 2011 15:13:23 -0700 Subject: [PATCH 07/14] Fix deleted in git.zsh --- lib/git.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index 2ace3d0e0..ce4de5598 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -52,11 +52,11 @@ git_prompt_status() { if $(echo "$INDEX" | grep '^R ' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS" fi - if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then + if $(echo "$INDEX" | grep '^D ' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS" fi if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_UNMERGED$STATUS" fi echo $STATUS -} \ No newline at end of file +} From 23a082df129b12b6edf8ea04432b0cb2be0588fd Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 1 Jun 2011 09:33:12 +0200 Subject: [PATCH 08/14] Revert "Added my zsh theme file, heavily based on sjl's" as it relies on a dotfile to be in ~/bin. This reverts commit f2f34f5404e8ab674a0e345a709783b6c56a3b72. --- themes/thomasjbradley.zsh-theme | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 themes/thomasjbradley.zsh-theme diff --git a/themes/thomasjbradley.zsh-theme b/themes/thomasjbradley.zsh-theme deleted file mode 100644 index 857301d19..000000000 --- a/themes/thomasjbradley.zsh-theme +++ /dev/null @@ -1,29 +0,0 @@ -function prompt_char { - git branch >/dev/null 2>/dev/null && echo '±' && return - hg root >/dev/null 2>/dev/null && echo '☿' && return - echo '○' -} - -function virtualenv_info { - [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' -} - -function hg_prompt_info { - hg prompt --angle-brackets "\ -< on %{$fg[magenta]%}%{$reset_color%}>\ -< at %{$fg[yellow]%}%{$reset_color%}>\ -%{$fg[green]%}%{$reset_color%}< -patches: >" 2>/dev/null -} - -PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) -$(virtualenv_info)$(prompt_char) ' - -ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" -ZSH_THEME_GIT_PROMPT_CLEAN="" - -. ~/bin/dotfiles/zsh/aliases From 0d476e02cd1b5660b09acde25725191044f062ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Had=C5=BEi=C4=87?= Date: Wed, 1 Jun 2011 12:45:15 +0200 Subject: [PATCH 09/14] Adds my theme --- themes/miloshadzic.zsh-theme | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 themes/miloshadzic.zsh-theme diff --git a/themes/miloshadzic.zsh-theme b/themes/miloshadzic.zsh-theme new file mode 100644 index 000000000..ad5394423 --- /dev/null +++ b/themes/miloshadzic.zsh-theme @@ -0,0 +1,8 @@ +# Yay! High voltage and arrows! + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}⚡%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +PROMPT='%{$fg[cyan]%}%1~%{$reset_color%}%{$fg[red]%}|%{$reset_color%}$(git_prompt_info)%{$fg[cyan]%}⇒%{$reset_color%} ' From c1b5d72830629c737f40abebf87fcca797bf730c Mon Sep 17 00:00:00 2001 From: "Suraj N. Kurapati" Date: Wed, 1 Jun 2011 20:38:25 -0700 Subject: [PATCH 10/14] add "sunaku" theme, see http://ompldr.org/vOHcwZg --- themes/sunaku.zsh-theme | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 themes/sunaku.zsh-theme diff --git a/themes/sunaku.zsh-theme b/themes/sunaku.zsh-theme new file mode 100644 index 000000000..440fa90b4 --- /dev/null +++ b/themes/sunaku.zsh-theme @@ -0,0 +1,26 @@ +# Git-centric variation of the "fishy" theme. +# See screenshot at http://ompldr.org/vOHcwZg + +ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[green]%}+" +ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[magenta]%}!" +ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}-" +ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}>" +ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[cyan]%}#" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[yellow]%}?" + +ZSH_THEME_GIT_PROMPT_PREFIX="" +ZSH_THEME_GIT_PROMPT_SUFFIX=" " +ZSH_THEME_GIT_PROMPT_DIRTY="" +ZSH_THEME_GIT_PROMPT_CLEAN="" + +local user_color='green' +test $UID -eq 0 && user_color='red' + +PROMPT='%(?..%{$fg_bold[red]%}exit %? +%{$reset_color%})'\ +'%{$bold_color%}$(git_prompt_status)%{$reset_color%}'\ +'$(git_prompt_info)'\ +'%{$fg[$user_color]%}%~%{$reset_color%}'\ +'%(!.#.>) ' + +PROMPT2='%{$fg[red]%}\ %{$reset_color%}' From 9b63a03bcfb7a6c34281d7d905575c5647e9c8d2 Mon Sep 17 00:00:00 2001 From: Matt Doran Date: Sat, 4 Jun 2011 00:32:05 +1000 Subject: [PATCH 11/14] Fix typos in the svn plugin that would cause calls to 'svn' when not in an svn working copy. --- plugins/svn/svn.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index 45d461306..86050227d 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -13,7 +13,7 @@ function in_svn() { } function svn_get_repo_name { - if [ is_svn ]; then + if [ in_svn ]; then svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | sed "s/\/.*$//" @@ -21,13 +21,13 @@ function svn_get_repo_name { } function svn_get_rev_nr { - if [ is_svn ]; then + if [ in_svn ]; then svn info 2> /dev/null | sed -n s/Revision:\ //p fi } function svn_dirty_choose { - if [ is_svn ]; then + if [ in_svn ]; then s=$(svn status 2>/dev/null) if [ $s ]; then echo $1 @@ -39,4 +39,4 @@ function svn_dirty_choose { function svn_dirty { svn_dirty_choose $ZSH_THEME_SVN_PROMPT_DIRTY $ZSH_THEME_SVN_PROMPT_CLEAN -} \ No newline at end of file +} From 0c41b1cdc3ff7b00ffb2310b91becb91b31704f7 Mon Sep 17 00:00:00 2001 From: Andrew Hodges Date: Fri, 3 Jun 2011 14:05:25 -0400 Subject: [PATCH 12/14] Colorize Install & Upgrade Scripts Make tools/install.sh and tools/upgrade.sh pretty. --- tools/install.sh | 28 ++++++++++++++-------------- tools/upgrade.sh | 21 +++++++++++---------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 8ed1403af..aedb706da 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,36 +1,36 @@ if [ -d ~/.oh-my-zsh ] then - echo "You already have Oh My Zsh installed. You'll need to remove ~/.oh-my-zsh if you want to install" + echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove ~/.oh-my-zsh if you want to install" exit fi -echo "Cloning Oh My Zsh..." +echo "\033[0;34mCloning Oh My Zsh...\033[0m" /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh -echo "Looking for an existing zsh config..." +echo "\033[0;34mLooking for an existing zsh config...\033[0m" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] then - echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh"; + echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh\033[0m"; cp ~/.zshrc ~/.zshrc.pre-oh-my-zsh; rm ~/.zshrc; fi -echo "Using the Oh My Zsh template file and adding it to ~/.zshrc" +echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc -echo "Copying your current PATH and adding it to the end of ~/.zshrc for you." +echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" echo "export PATH=$PATH" >> ~/.zshrc -echo "Time to change your default shell to zsh!" +echo "\033[0;34mTime to change your default shell to zsh!\033[0m" chsh -s `which zsh` -echo ' __ __ ' -echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' -echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' -echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' -echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' -echo ' /____/' +echo "\033[0;32m"' __ __ '"\033[0m" +echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" +echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" +echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" +echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" +echo "\033[0;32m"' /____/ '"\033[0m" -echo "\n\n ....is now installed." +echo "\n\n \033[0;32m....is now installed.\033[0m" /usr/bin/env zsh source ~/.zshrc diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 6bdd02e38..7e5cc7655 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -1,12 +1,13 @@ current_path=`pwd` -echo "Upgrading Oh My Zsh" +echo "\033[0;34mUpgrading Oh My Zsh\033[0m" ( cd $ZSH && git pull origin master ) -echo ' __ __ ' -echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' -echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' -echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' -echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' -echo ' /____/' -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." -echo "To keep up on the latest, be sure to follow Oh My Zsh on twitter: http://twitter.com/ohmyzsh" -cd $current_path \ No newline at end of file +echo "\033[0;32m"' __ __ '"\033[0m" +echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" +echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" +echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" +echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" +echo "\033[0;32m"' /____/ '"\033[0m" +echo "\033[0;34mHooray! Oh My Zsh has been updated and/or is at the current version.\033[0m" +echo "\033[0;34mAny new updates will be reflected when you start your next terminal session.\033[0m" +echo "\033[0;34mTo keep up on the latest, be sure to follow Oh My Zsh on twitter: \033[1mhttp://twitter.com/ohmyzsh\033[0m" +cd $current_path From 7c9474508cade14102a2fe1c63ad845fda521bec Mon Sep 17 00:00:00 2001 From: vguerci Date: Sat, 4 Jun 2011 11:02:25 +0200 Subject: [PATCH 13/14] [upgrade] before init (no reload needed unless oh-my-zsh.sh has been modified) --- oh-my-zsh.sh | 17 ++++++++--------- tools/upgrade.sh | 1 - 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index dbff1ced9..2157c38a0 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,3 +1,11 @@ +# Check for updates on initial load... +if [ "$DISABLE_AUTO_UPDATE" = "true" ] +then + return +else + /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh +fi + # Initializes Oh My Zsh # add a function path @@ -28,7 +36,6 @@ done for config_file ($ZSH/custom/*.zsh) source $config_file # Load the theme -# Check for updates on initial load... if [ "$ZSH_THEME" = "random" ] then themes=($ZSH/themes/*zsh-theme) @@ -41,11 +48,3 @@ else source "$ZSH/themes/$ZSH_THEME.zsh-theme" fi - -# Check for updates on initial load... -if [ "$DISABLE_AUTO_UPDATE" = "true" ] -then - return -else - /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh -fi diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 7e5cc7655..e30488822 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -8,6 +8,5 @@ echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" echo "\033[0;32m"' /____/ '"\033[0m" echo "\033[0;34mHooray! Oh My Zsh has been updated and/or is at the current version.\033[0m" -echo "\033[0;34mAny new updates will be reflected when you start your next terminal session.\033[0m" echo "\033[0;34mTo keep up on the latest, be sure to follow Oh My Zsh on twitter: \033[1mhttp://twitter.com/ohmyzsh\033[0m" cd $current_path From 9b4a89f327a045ed5e756ae4e75d1aac68803164 Mon Sep 17 00:00:00 2001 From: Michael Komitee Date: Sat, 4 Jun 2011 14:03:10 -0400 Subject: [PATCH 14/14] Fix bug from Pull request #395 #395 broke oh-my-zsh for users who disable check-for-updates --- oh-my-zsh.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 2157c38a0..d72d90cf9 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,8 +1,6 @@ # Check for updates on initial load... -if [ "$DISABLE_AUTO_UPDATE" = "true" ] +if [ "$DISABLE_AUTO_UPDATE" != "true" ] then - return -else /usr/bin/env zsh $ZSH/tools/check_for_upgrade.sh fi