mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Restrict pkg
completions to BSD
0507b04 loosened the FreeBSD-only restriction on `pkg` completions to !SunOS in order to support DragonFlyBSD. This is overly broad and can still cause the script to be loaded on systems that we can't realistically expect to have `pkg` be the FreeBSD pkgng package manager (especially since `pkg` is a much more generic term when compared to the likes of `dnf`, `yum`, `deb`, and `apt`). This patch changes `pkg` + BSD to be the minimum requirements for considering a system to be using pkgng.
This commit is contained in:
parent
7669e8e497
commit
b5523dbd64
@ -1,8 +1,14 @@
|
|||||||
# Completions for pkgng package manager
|
# Completions for pkgng package manager
|
||||||
|
|
||||||
# Solaris has a thing called "pkg", it works quite differently,
|
# Solaris has a thing called "pkg"; it works quite differently and spews errors when called here.
|
||||||
# and spews errors when called like this.
|
# There are multiple SunOS-derived distributions and not all of them have `SunOS` in their name (and
|
||||||
if uname | string match -q SunOS
|
# some of them also use pkgsrc and have a `pkg`).
|
||||||
|
#
|
||||||
|
# Additionally, this particular script is intended to complete the pkgng "Next Generation" package
|
||||||
|
# manager initially developed for FreeBSD though now available on a few other BSDs. From here on
|
||||||
|
# out, maintainers can assume we are specifically talking about the (Free)BSD `pkg` command being
|
||||||
|
# executed on a BSD system, rather than just work with "not SunOS".
|
||||||
|
if ! uname | string match -irq bsd
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user