diff --git a/bash_profile b/bash_profile index a265bd6..00d7332 100644 --- a/bash_profile +++ b/bash_profile @@ -65,9 +65,9 @@ pinfo(){ } update(){ - yellow='\e[1;33m' - none='\e[0m' - if $1 == '-v' ; then + yellow='\x1B[0;33m' + none='\x1B[0m' + if [[ $1 == '-v' ]] ; then echo -e "${yellow}Updating homebrew formulae${none}" brew update echo -e "${yellow}Updating installed sources(Homebrew)${none}" diff --git a/zshrc b/zshrc index 904063c..e8b679c 100644 --- a/zshrc +++ b/zshrc @@ -99,9 +99,10 @@ pinfo(){ } update(){ - yellow='\e[1;33m' - none='\e[0m' - if $1 == '-v' ; then + autoload -U colors && colors + yellow=$fg_no_bold[yellow] + none=$reset_color + if [[ $1 == '-v' ]] ; then echo -e "${yellow}Updating homebrew formulae${none}" brew update echo -e "${yellow}Updating installed sources(Homebrew)${none}" @@ -118,6 +119,6 @@ update(){ echo -e "${yellow}Updating MacPorts (sudo required)${none}" sudo port selfupdate &> /dev/null echo -e "${yellow}Updating installed sources(MacPorts)${none}" - sudo port upgrade outdated & /dev/null + sudo port upgrade outdated &> /dev/null fi }