From 8603260648c503b2e768e131da9c52c19a503ab6 Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Thu, 26 Jan 2012 03:52:12 -0500 Subject: [PATCH] only use color if :omz:plugin:upgrade color is set --- plugins/upgrade/init.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/upgrade/init.zsh b/plugins/upgrade/init.zsh index a192f975..27194abd 100644 --- a/plugins/upgrade/init.zsh +++ b/plugins/upgrade/init.zsh @@ -22,10 +22,12 @@ function upgrade_zsh() { zstyle -t ':omz:plugin:upgrade' auto-commit || nocommit='--no-commit' if git pull $nocommit --strategy=recursive -X ours origin master; then - printf '\033[0;34m%s\033[0m\n' 'Hooray! oh-my-zsh is up-to-date :)' + zstyle -t ':omz:plugin:upgrade' color && printf '\033[0;34m%s\033[0m\n' + printf 'Hooray! oh-my-zsh is up-to-date :)' touch ~/.zsh-upgrade else - printf '\033[0;31m%s\033[0m\n' 'Oh no! There was an error upgrading oh-my-zsh :(' + zstyle -t ':omz:plugin:upgrade' color && printf '\033[0;31m%s\033[0m\n' + printf 'Oh no! There was an error upgrading oh-my-zsh :(' fi cd $current_path