File tree 2 files changed +18
-6
lines changed
2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,15 @@ vim -u $HOME/.vimrc.bundles +PlugInstall +PlugClean! +qa
10
10
11
11
# detect old OS X broken /etc/zshenv and suggest rename
12
12
if grep -qw path_helper /etc/zshenv 2> /dev/null; then
13
- fg_red=$' \e [31m'
14
- fg_bold_white=$' \e [1;37m'
15
- reset_color=$' \e [m'
13
+ if [ -t 2 ]; then
14
+ fg_red=$' \e [31m'
15
+ fg_bold_white=$' \e [1;37m'
16
+ reset_color=$' \e [m'
17
+ else
18
+ fg_red=" "
19
+ fg_bold_white=" "
20
+ reset_color=" "
21
+ fi
16
22
17
23
# resolve BASH_SOURCE to absolute path
18
24
bash_source=" $BASH_SOURCE "
Original file line number Diff line number Diff line change @@ -6,9 +6,15 @@ local _old_path="$PATH"
6
6
if [[ $PATH != $_old_path ]]; then
7
7
# `colors` isn't initialized yet, so define a few manually
8
8
typeset -AHg fg fg_bold
9
- fg[red]=$' \e [31m'
10
- fg_bold[white]=$' \e [1;37m'
11
- reset_color=$' \e [m'
9
+ if [ -t 2 ]; then
10
+ fg[red]=$' \e [31m'
11
+ fg_bold[white]=$' \e [1;37m'
12
+ reset_color=$' \e [m'
13
+ else
14
+ fg[red]=" "
15
+ fg_bold[white]=" "
16
+ reset_color=" "
17
+ fi
12
18
13
19
cat << MSG >&2
14
20
${fg[red]} Warning:${reset_color} your \` ~/.zshenv.local' configuration seems to edit PATH entries.
You can’t perform that action at this time.
0 commit comments