Closed vboginskey closed 7 months ago
@indrajitr thoughts?
@vboginskey, apologies for the delayed response.
There are a few things to consider here:
fpath
is not necessarily about completion functions only. They are also about other Zsh internal functions and helpers.fpath
members, they have to be at a more generalized place and they have to be customizable (which would be typically in $ZDOTDIR/zprofile
).Summary:
/bin/zsh
, you'd automatically have /usr/share/zsh/site-functions
and /usr/share/zsh/5.9/functions
in your $fpath
./opt/homebrew/bin/zsh
, you'd automatically have /opt/homebrew/share/zsh/site-functions
and /opt/homebrew/Cellar/zsh/5.9/share/zsh/functions
in your $fpath
.You have two options from here:
/opt/homebrew/share/zsh/site-functions
and /opt/homebrew/Cellar/zsh/5.9/share/zsh/functions
in your $fpath
) in your $ZDOTDIR/zprofile
and brace for some inconsistencies with built-in Zsh functions./opt/homebrew/bin/zsh
) instead of macOS native Zsh (from /bin/zsh
).That all makes sense, thank you for the detailed response 🙏 .
Proposed Changes
This PR adds the Homebrew completion directory to
fpath
to enable Zsh to automatically pick up completions from Homebrew-installed packages.