Skip to content
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

Carapace formula uses the wrong command to generate completions #200597

Open
4 tasks done
BurnerWah opened this issue Dec 9, 2024 · 2 comments
Open
4 tasks done

Carapace formula uses the wrong command to generate completions #200597

BurnerWah opened this issue Dec 9, 2024 · 2 comments
Labels
bug Reproducible Homebrew/homebrew-core bug

Comments

@BurnerWah
Copy link

brew gist-logs <formula> link OR brew config AND brew doctor output

https://gist.github.com/BurnerWah/d9f25e3832e6b2c76fc2dbe03247bded

Verification

  • My brew doctor output says Your 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
@BurnerWah BurnerWah added the bug Reproducible Homebrew/homebrew-core bug label Dec 9, 2024
@chenrui333
Copy link
Member

@BurnerWah 👋 thanks for pointing out the issue, do you mind drop a PR for fixing it? Thanks!

@BurnerWah
Copy link
Author

@BurnerWah 👋 thanks for pointing out the issue, do you mind drop a PR for fixing it? Thanks!

I originally wanted too but i couldn't get the homebrew core repo to clone lol
I could try again later today though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Reproducible Homebrew/homebrew-core bug
Projects
None yet
Development

No branches or pull requests

2 participants