-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshenv
30 lines (24 loc) · 778 Bytes
/
zshenv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
local _old_path="$PATH"
# Local config
[[ -f ~/Documents/Sync/zshenv.sync ]] && source ~/Documents/Sync/zshenv.sync
[[ -f ~/.zshenv.local ]] && source ~/.zshenv.local
if [[ $PATH != $_old_path ]]; then
# `colors` isn't initialized yet, so define a few manually
typeset -AHg fg fg_bold
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 <<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