Colorize Uninstall, Improve Colorization of Install and Upgrade #396

Closed
wants to merge 2 commits into
from

Projects

None yet

4 participants

@betawaffle
Contributor

Ok, I've made improvements to #393. Now the code looks (a bit) nicer, and it's easier to change if you don't like some decision I've made.

Enjoy!

@betawaffle betawaffle commented on the diff Jun 4, 2011
tools/install.sh
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]
then
- echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32]Backing up to ~/.zshrc.pre-oh-my-zsh\033[0m";
@betawaffle
betawaffle Jun 4, 2011 Contributor

I don't know why these lines had semicolons. I decided to make them consistent with the rest of the lines.

@betawaffle betawaffle commented on the diff Jun 4, 2011
tools/uninstall.sh
if [ -f ~/.zshrc.pre-oh-my-zsh ] || [ -h ~/.zshrc.pre-oh-my-zsh ]
then
- echo "Found ~/.zshrc. Backing up to ~/.zshrc.pre-oh-my-zsh";
@betawaffle
betawaffle Jun 4, 2011 Contributor

This was copied verbatim from tools/install.sh. Now it isn't lying.

@betawaffle betawaffle commented on the diff Jun 4, 2011
tools/uninstall.sh
chsh -s /bin/bash
source /etc/profile
fi
-echo "Thanks for trying out Oh My Zsh. It's been uninstalled."
@betawaffle
betawaffle Jun 4, 2011 Contributor

It's isn't gramatical here, fixed.

@betawaffle betawaffle commented on the diff Jun 4, 2011
tools/upgrade.sh
( cd $ZSH && git pull origin master )
-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"
@betawaffle
betawaffle Jun 4, 2011 Contributor

Oh My Zsh is always at the current version. This script upgrades it to the latest version.

@betawaffle betawaffle commented on the diff Jun 4, 2011
tools/uninstall.sh
@@ -1,20 +1,26 @@
-echo "Removing ~/.oh-my-zsh"
+RESET="\033[0m"
+RED="\033[0;31m"
+BLUE="\033[0;34m"
+GREEN="\033[0;32m"
+YELLOW="\033[0;33m"
+UNDERLN="\033[4m"
+echo "${RED}Removing ~/.oh-my-zsh${RESET}"
if [[ -d ~/.oh-my-zsh ]]
@betawaffle
betawaffle Jun 4, 2011 Contributor

Shouldn't we be using $ZSH here?

@superbobry
superbobry Jun 5, 2011

How about:

  1. Use echo -e -- that way, you don't need the ugly \033 echo -e "\e[0m"
  2. Use zsh (http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Visual-effects)[escapes], for example %F{red}foo%f
@betawaffle
betawaffle Jun 5, 2011 Contributor

This is a sh (shell) script, not a zsh script. I do normally use \e, I feel like there was a reason why I didn't use it here, but i don't recall.

I've read over that page at least 100 times in the past few weeks, and I never noticed the %F escape. Thanks!

betawaffle added some commits Jun 4, 2011
@betawaffle betawaffle Colorized Tool Improvement
Replace color codes with easy to understand names. Improve wording of
some messages.
45b4594
@betawaffle betawaffle Remove Strange, Unnecessary Semicolons 3e6d6df
@betawaffle
Contributor

Rebased.

@robbyrussell
Owner

Currently can't merge this...

@betawaffle
Contributor

I'm really busy right now, ill update it if I have some free time.

@eddorre
Contributor
eddorre commented Feb 21, 2012

No traction on this in 6 months. Re-open when/if we can merge this.

@eddorre eddorre closed this Feb 21, 2012
@betawaffle
Contributor

Meh, if someone really cares about this, let me know...

@vguerci vguerci pushed a commit to vguerci/oh-my-zsh that referenced this pull request Mar 14, 2013
@sorin-ionescu sorin-ionescu [Fix #396] Remove the osx trash function
The trash program found at http://hasseg.org/trash is a superior
implementation.
e2c5f2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment