https://docs.brew.sh/Shell-Completion
https://github.com/Linuxbrew/brew/blob/master/docs/Shell-Completion.md#configuring-completions-in-zsh
It doesn't appear that zsh completion works by default. Even if a user is happily using zsh completion for other commands, homebrew requires explicit extra steps to activate. Could homebrew install zsh completions into the standard locations? Or prompt to automatically insert into the users .zshrc with the specific fix?
Hi @yschimke, thanks for sponsoring Homebrew! Please always fill out the issue template; it saves us time when triaging issues.
We do install ZSH completions into their standard locations within the Homebrew prefix but unfortunately that's not enough for ZSH to pick them up by default. They need manual configuration in order to avoid security issues.
Does that answer your question?
No, I understand the situation. It seems that it means that completions don't work for most users who will install my app.
I'm asking if there is any plan to improve it?
It seems suboptimal if most apps print out instructions to include things in startup scripts.
P.s. I love homebrew. The sponsorship is unrelated and very minimal.
It seems that it means that completions don't work for most users who will install my app.
Is your app installed by Homebrew?
I'm asking if there is any plan to improve it?
I don't think we can set this automatically, unfortunately 馃槶. We do notify users when applications install ZSH completions with setup instructions.
P.s. I love homebrew. The sponsorship is unrelated and very minimal.
Thanks! Very related in my mind 鉂わ笍!
Yep - three small CLIs
https://github.com/yschimke/homebrew-tap/blob/master/rsocket-cli.rb
https://github.com/yschimke/homebrew-tap/blob/master/okurl.rb
https://github.com/yschimke/homebrew-tap/blob/master/cooee.rb
I was hoping to get as closed to one command install, but noone I've tested with has had the final step of zsh completion already set up, so installing these commands for a friend testing something means explaining the additional set of completion files they need to register.
$ tail -7 ~/.zshrc
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh/site-functions:$FPATH
autoload -Uz compinit
compinit
fi
Feel free to close if it's not worth the hassle.
@yschimke I see:
==> Installing rsocket-cli from yschimke/tap
==> Downloading https://jitpack.io/com/github/rsocket/rsocket-cli/1.26/rsocket-cli-1.26.tar
######################################################################## 100.0%
==> Caveats
zsh completions have been installed to:
/usr/local/share/zsh/site-functions
Do you think this message should be better adapted to explain how to setup completion if it isn't already?
Do you think this message should be better adapted to explain how to setup completion if it isn't already?
+100, ideally detect if it's already in fpath of the user running the install, and if not explain the steps to fix!
I am using zsh, I could not install home-brew. when I used to Mac ons bsh I could install easily. But I can not install that now. I am tried brew command install methods. Also I can use git but my zsh terminal why do not see brew?

I am using zsh, I could not install home-brew. when I used to Mac ons bsh I could install easily. But I can not install that now. I am tried brew command install methods. Also I can use git but my zsh terminal why do not see brew?
@alperenkilic I think this is a differnt topic that deserves it's own issue.
n.b. gradle-completion page has incrrect steps for this, since homebrew location isn't hardcoded.
https://github.com/gradle/gradle-completion
# Ensure /usr/local/share/zsh/site-functions is on $fpath. You should get a result from the following
echo $fpath | grep "/usr/local/share/zsh/site-functions"
The motivation factor to get this working probably means that only the developer who writes the completion to scratch an itch gets the benefit, while everyone else blindly misses that it is not configured.
Most helpful comment
@yschimke I see:
Do you think this message should be better adapted to explain how to setup completion if it isn't already?