-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completions by brew installed packages are missing #2103
Comments
Hi @onc, this should have worked OOTB. Could you please verify if the path |
Hi @onc, I see what's happening. Almost certainly you are using macOS bundled zsh ( Usually, default Historically, macOS zsh used to be quite outdated, and using Homebrewed zsh was the norm. But now that they diverge much less, macOS bundled zsh if fine too. So adding in You can continue have |
Yes, you are right. I'm using the macOS bundled version of zsh. Thank you for your help. |
@onc I'm wondering what is wrong on my side. I added fpath=(
/opt/homebrew/share/zsh/site-functions
$fpath
) to my My I'm also on the same macOS default ZSH and same operation system (M1 Pro). Any ideas, or maybe you could be more explicit? thanks. |
UPDATE: It is indeed the different user... hmm. No idea, how to get this working....
|
TLDR: add it like this to you # Add homebrew-installed package completions to fpath
if command -v brew > /dev/null; then
fpath+=$(brew --prefix)/share/zsh/site-functions
fi
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.dotfiles/prezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.dotfiles/prezto/init.zsh"
fi I'm not sure if I can help you here, I'm not an expert myself, but here is what I understand: On you system, every path that is This cache file is build using However, prezto does not use this location, but rather Also, by default, the prezto will rebuild the cache every 20 hours (see here). And does some other magic. So rather than calling |
Description
First, thank you for this project. I was using oh-my-zsh for years and just recently switched to prezto and oh boy, it feels so good! Never going back!
While configuring my system, I noticed that completions from homebrew installed packages are not working. After some investigations, I noticed that the homebrew fpath is missing in the fpath build by prezto. In my case this would be
/opt/homebrew/share/zsh/site-functions
.I can achieve my desired behavior by doing the following:
Expected behavior
The homebrew completions path should added to
fpath
.Actual behavior
The path is missing in
fpath
.Steps to Reproduce
brew
hit<TAB>
Versions
The text was updated successfully, but these errors were encountered: