diff --git a/hooks/post-up b/hooks/post-up index 5b119ee..9057109 100755 --- a/hooks/post-up +++ b/hooks/post-up @@ -10,9 +10,15 @@ vim -u $HOME/.vimrc.bundles +PlugInstall +PlugClean! +qa # detect old OS X broken /etc/zshenv and suggest rename if grep -qw path_helper /etc/zshenv 2>/dev/null; then - fg_red=$'\e[31m' - fg_bold_white=$'\e[1;37m' - reset_color=$'\e[m' + if [ -t 2 ]; then + fg_red=$'\e[31m' + fg_bold_white=$'\e[1;37m' + reset_color=$'\e[m' + else + fg_red="" + fg_bold_white="" + reset_color="" + fi # resolve BASH_SOURCE to absolute path bash_source="$BASH_SOURCE" diff --git a/zshenv b/zshenv index 283cfec..5d2d258 100644 --- a/zshenv +++ b/zshenv @@ -6,9 +6,15 @@ local _old_path="$PATH" if [[ $PATH != $_old_path ]]; then # `colors` isn't initialized yet, so define a few manually typeset -AHg fg fg_bold - fg[red]=$'\e[31m' - fg_bold[white]=$'\e[1;37m' - reset_color=$'\e[m' + if [ -t 2 ]; then + fg[red]=$'\e[31m' + fg_bold[white]=$'\e[1;37m' + reset_color=$'\e[m' + else + fg[red]="" + fg_bold[white]="" + reset_color="" + fi cat <&2 ${fg[red]}Warning:${reset_color} your \`~/.zshenv.local' configuration seems to edit PATH entries.