summaryrefslogtreecommitdiff
path: root/dotfiles-darwin/zsh
diff options
context:
space:
mode:
authorGrégoire Duchêne <gregoire@awhk.org>2026-09-20 16:29:07 +0100
committerGrégoire Duchêne <gregoire@awhk.org>2026-09-20 16:29:07 +0100
commit15a9759c6c40a931702a925871dacac6960a1a65 (patch)
tree36123d7776038d537f3239b3cd1bd01b479e4112 /dotfiles-darwin/zsh
parent0c69614cf423b87f1f4f431e7461d0132f1218b4 (diff)
darwin/zsh: Add Homebrew completion functions
Diffstat (limited to 'dotfiles-darwin/zsh')
-rw-r--r--dotfiles-darwin/zsh/rc7
1 files changed, 7 insertions, 0 deletions
diff --git a/dotfiles-darwin/zsh/rc b/dotfiles-darwin/zsh/rc
index faa0fef..817230c 100644
--- a/dotfiles-darwin/zsh/rc
+++ b/dotfiles-darwin/zsh/rc
@@ -17,6 +17,13 @@ else
alias lsh='ls -Shlr | cut -f5- -w'
fi
+if [[ -d /opt/homebrew/share/zsh/site-functions ]]; then
+ # Unlike the /usr/local/… path, this path has to be manually added. We
+ # append it before the first system-wide ones and after the dotfiles
+ # ones.
+ fpath[${fpath[(i)/usr/local/share/zsh/site-functions]},0]=/opt/homebrew/share/zsh/site-functions
+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