Carapace formula uses the wrong command to generate completions #200597
Description
brew gist-logs <formula>
link OR brew config
AND brew doctor
output
https://gist.github.com/BurnerWah/d9f25e3832e6b2c76fc2dbe03247bded
Verification
- My
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue. - I ran
brew update
and am still able to reproduce my issue. - I have resolved all warnings from
brew doctor
and that did not fix my problem. - I searched for recent similar issues at https://github.com/Homebrew/homebrew-core/issues?q=is%3Aissue and found no duplicates.
What were you trying to do (and why)?
Honestly nothing, as my personal system config already mitigates this issue
That having been said I'll just explain the issue here
The carapace formula uses the command carapace _carapace
to generate shell completions, but this command doesn't actually generate completions for carapaace
. It's the command used to set up completion for all the commands that carapace supports - which should be run in a .zshrc or as a fish conf.d script.
https://github.com/Homebrew/homebrew-core/blob/master/Formula/c/carapace.rb#L24
The completion scripts that were generated: https://gist.github.com/BurnerWah/b0f4f1d862543511472031d69f4980b9
Completions for carapace itself are actually generated by running carapace carapace
What happened (include all command output)?
for fish users, typing carapace would modify the path by adding a directory like /private/tmp/carapace-20241208-4835-gg4x4x/carapace-bin-1.1.0/.brew_home/Library/Application Support/carapace/bin
to the user's path, and it would modify the completions for around 600 extra commands
for zsh users, nothing should happen at all since the site-functions script lacks a #compdef
at the top of it
What did you expect to happen?
the completions for carapace to be loaded, without modifying the completions for other commands, or modifying the path
Step-by-step reproduction instructions (by running brew
commands)
`brew install carapace`
# then just do anything that should load the completions for carapace