Fix macOS PATH being rewritten in /etc/zprofile
macOS is obnoxious and overwrites the PATH from a users ~/.zshenv, which is sourced first, in /etc/zprofile by calling `/usr/libexec/path_helper -s` so this is required so that PATH is once again set to the desired value.
This commit is contained in:
16
zshrc
16
zshrc
@@ -158,22 +158,6 @@ fi
|
||||
# Load work related config
|
||||
[ -f ~/.config/work/zshrc ] && source ~/.config/work/zshrc
|
||||
|
||||
# Remove duplicates from environment variables
|
||||
typeset -U PATH
|
||||
typeset -U MANPATH
|
||||
typeset -U INFOPATH
|
||||
|
||||
# Add ccache symlink directory to start of PATH, this must be after
|
||||
# `typeset -U PATH` because on macOS this reorders the list so ccache's
|
||||
# symlinks will no longer be at the start of PATH rendering it unusable.
|
||||
if [ `uname` = Darwin ]; then
|
||||
[ -f /usr/local/bin/ccache ] && \
|
||||
PATH=/usr/local/opt/ccache/libexec:$PATH
|
||||
else
|
||||
[ -f /usr/bin/ccache ] && \
|
||||
PATH=/usr/lib/ccache:$PATH
|
||||
fi
|
||||
|
||||
# Aliases
|
||||
alias grep='grep --color=always'
|
||||
which cmake &> /dev/null && \
|
||||
|
||||
Reference in New Issue
Block a user