homebrew: Load 'HOMEBREW_' prefixed variables only

Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH'
related variables as they are already handled in standard zsh 
configuration.
This commit is contained in:
Indrajit Raychaudhuri 2018-12-14 15:40:59 -06:00 committed by GitHub
parent 11184084bc
commit 3093f1b966
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,10 +14,11 @@ fi
# Variables
#
# Load standard Homebrew shellenv into the shell session.
# `brew shellenv` is relatively new, guard for legacy Homebrew.
# Load standard Homebrew shellenv into the shell session.
# Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH' related
# variables as they are already handled in standard zsh configuration.
if (( $+commands[brew] )); then
eval "$(brew shellenv 2> /dev/null)"
eval "${(@M)${(f)"$(brew shellenv 2> /dev/null)"}:#export HOMEBREW*}"
fi
#