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

Bun installs Fish completions to an inconvienient directory #17855

Open
jack-weilage opened this issue Mar 2, 2025 · 1 comment · May be fixed by #17984
Open

Bun installs Fish completions to an inconvienient directory #17855

jack-weilage opened this issue Mar 2, 2025 · 1 comment · May be fixed by #17984
Labels
bug Something isn't working cli Something to do with CLI arguments good first issue Something that would be good for new contributors

Comments

@jack-weilage
Copy link

jack-weilage commented Mar 2, 2025

What version of Bun is running?

1.2.4+fd9a5ea66

What platform is your computer?

Linux 6.13.4-arch1-1 x86_64 unknown

What steps can reproduce the bug?

What is the expected behavior?

Bun should install a completion file to a vendor directory as described in fish's documentation. At the bottom of the section, it describes how programs should ship their completions:

If you are developing another program and would like to ship completions with your program, install them to the “vendor” completions directory. As this path may vary from system to system, the pkgconfig framework should be used to discover this path with the output of pkg-config --variable completionsdir fish.

What do you see instead?

Bun installs completions to XDG_CONFIG_HOME/fish/completions, XDG_DATA_HOME/fish/completions, $HOME/.config/fish/completions, /usr/local/share/fish/completions, /opt/homebrew/share/fish/completions, or /etc/fish/completions (source). Almost all of these directories are expected to be user-facing, and should not be used for this purpose.

Additional information

This isn't a pressing issue, but is quite annoying for fish users.

If the dependency on pkg-config shouldn't be added, it would be reasonable to simply check for the existence of /usr/share/fish/vendor_completions.d before the other directories.

@jack-weilage jack-weilage added bug Something isn't working needs triage labels Mar 2, 2025
@RiskyMH RiskyMH added cli Something to do with CLI arguments and removed needs triage labels Mar 3, 2025
@190n 190n added the good first issue Something that would be good for new contributors label Mar 3, 2025
martinklepsch added a commit to martinklepsch/bun that referenced this issue Mar 7, 2025
@martinklepsch
Copy link

martinklepsch commented Mar 7, 2025

Had a stab at this, but couldn't get the build to work: #17984

(sharing in case someone else wants to pick it up)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Something to do with CLI arguments good first issue Something that would be good for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants