From 3093f1b966985c834fb698dabbe9a0af805ef940 Mon Sep 17 00:00:00 2001 From: Indrajit Raychaudhuri Date: Fri, 14 Dec 2018 15:40:59 -0600 Subject: [PATCH] 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. --- modules/homebrew/init.zsh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/homebrew/init.zsh b/modules/homebrew/init.zsh index b449bac..056f1fb 100644 --- a/modules/homebrew/init.zsh +++ b/modules/homebrew/init.zsh @@ -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 #