描述
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?
- Use fish shell
- Run
bun completions
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
pkgconfigframework should be used to discover this path with the output ofpkg-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.