2015-10-05 01:43:32 +02:00
|
|
|
local _old_path="$PATH"
|
|
|
|
|
2014-07-27 22:54:36 -04:00
|
|
|
# Local config
|
|
|
|
[[ -f ~/.zshenv.local ]] && source ~/.zshenv.local
|
2015-10-05 01:43:32 +02:00
|
|
|
|
|
|
|
if [[ $PATH != $_old_path ]]; then
|
|
|
|
# `colors` isn't initialized yet, so define a few manually
|
|
|
|
typeset -AHg fg fg_bold
|
2015-10-16 18:22:46 +02:00
|
|
|
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
|
2015-10-05 01:43:32 +02:00
|
|
|
|
|
|
|
cat <<MSG >&2
|
|
|
|
${fg[red]}Warning:${reset_color} your \`~/.zshenv.local' configuration seems to edit PATH entries.
|
|
|
|
Please move that configuration to \`.zshrc.local' like so:
|
|
|
|
${fg_bold[white]}cat ~/.zshenv.local >> ~/.zshrc.local && rm ~/.zshenv.local${reset_color}
|
|
|
|
|
|
|
|
(called from ${(%):-%N:%i})
|
|
|
|
|
|
|
|
MSG
|
|
|
|
fi
|
|
|
|
|
|
|
|
unset _old_path
|