diff options
Diffstat (limited to 'dot_local/share/zsh/brew')
-rw-r--r-- | dot_local/share/zsh/brew/brew.plugin.zsh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dot_local/share/zsh/brew/brew.plugin.zsh b/dot_local/share/zsh/brew/brew.plugin.zsh index e929174..8d9113a 100644 --- a/dot_local/share/zsh/brew/brew.plugin.zsh +++ b/dot_local/share/zsh/brew/brew.plugin.zsh @@ -1,13 +1,13 @@ # Set up brew -if [[ -f /opt/homebrew/bin/brew ]]; then +if [[ -v HOMEBREW_PREFIX ]] && [[ -f "${HOMEBREW_PREFIX}/bin/brew" ]]; then export HOMEBREW_NO_ENV_HINTS=1 export HOMEBREW_NO_ANALYTICS=1 - eval "$(/opt/homebrew/bin/brew shellenv)" - fpath=("/opt/homebrew/share/zsh/site-functions" $fpath) + eval "$(${HOMEBREW_PREFIX}/bin/brew shellenv)" + fpath=("${HOMEBREW_PREFIX}/share/zsh/site-functions" $fpath) # Prefer GNU versions of certain tools local tool_bin - for tool_bin in /opt/homebrew/opt/*/libexec/gnubin(N); do + for tool_bin in "${HOMEBREW_PREFIX}"/opt/*/libexec/gnubin(N); do if [[ "${tool_bin}" == */gsed/* ]]; then continue # Alias to gnu-sed fi |