oven-sh/bun

Bun installs Fish completions to an inconvienient directory

Open

#17,855 创建于 2025年3月2日

在 GitHub 查看
 (1 评论) (1 反应) (0 负责人)Rust (90,348 star) (4,486 fork)batch import
bugcligood first issue

描述

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.

贡献者指南