diff options
| author | Grégoire Duchêne <gregoire@awhk.org> | 2026-05-04 18:02:23 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gregoire@awhk.org> | 2026-05-04 18:02:23 +0100 |
| commit | 1766d34aab35777faae6e123d75783501cebb7b6 (patch) | |
| tree | 38e756ff024a550262b1819f4b030faa6dacf1f4 | |
| parent | a2620f6d53f9f086ebf63bddfbd4bbd0f0409f7e (diff) | |
darwin/zsh: Fix Homebrew position in PATH
| -rw-r--r-- | dotfiles-darwin/zsh/rc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/dotfiles-darwin/zsh/rc b/dotfiles-darwin/zsh/rc index cb9ba33..12e295a 100644 --- a/dotfiles-darwin/zsh/rc +++ b/dotfiles-darwin/zsh/rc @@ -13,6 +13,12 @@ else alias lsh='ls -Shlr | cut -f5- -w' fi +# Make Homebrew appear right after /usr/local/bin. For some reason, +# Homebrew appears is at the end of the PATH, which is wrong. +if (( path[(i)/usr/local/bin] + 1 != path[(i)/opt/homebrew/bin] )); then + path[(i)/opt/homebrew/bin]=() + path[$((path[(i)/usr/local/bin] + 1)),0]=/opt/homebrew/bin +fi if [[ ${TERM_PROGRAM} != iTerm.app ]]; then autoload -Uz vcs_info |
