diff options
author | Alen <alen@dotfiles.xyz> | 2025-01-19 19:33:32 +0400 |
---|---|---|
committer | Alen <alen@dotfiles.xyz> | 2025-01-19 19:33:32 +0400 |
commit | 534899e2986732a569d15f231637447833a360b0 (patch) | |
tree | 8e2d1719ec9df2e0b17a867303892897122d7060 /dot_local/share/zsh/brew | |
parent | 81f3e6dcbf1913a2ba2a8f5fe2219b5206f270c0 (diff) |
Tidy up PATH bootstrapping, set up core brew PATHs in zshenv
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 |