From 15a9759c6c40a931702a925871dacac6960a1a65 Mon Sep 17 00:00:00 2001 From: Grégoire Duchêne Date: Sun, 20 Sep 2026 16:29:07 +0100 Subject: darwin/zsh: Add Homebrew completion functions --- dotfiles-darwin/zsh/rc | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.3.1