0e7e824085
Split _fish_deps_pm.fish into one file per function so Fish can autoload each by name (_fish_deps_detect_pm, _fish_deps_pm_install, _fish_deps_pm_upgrade). A single file with multiple functions only autoloads under the filename, leaving the others unreachable. Replace all `test -a`/`test -o` binary operators with `; and`/`; or` chains throughout _fish_deps_install and _fish_deps_update. Fish 4.x removed support for -a/-o in test, causing the "unexpected argument" errors seen on Debian. Also consolidate paru/yay cases in pm_install and pm_upgrade since both helpers use identical flags.
14 lines
309 B
Fish
14 lines
309 B
Fish
# Copyright (C) 2026 Rootiest
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
# Detect the first available system package manager.
|
|
function _fish_deps_detect_pm
|
|
for pm in paru yay pacman apt brew pkg dnf yum
|
|
if type -q $pm
|
|
echo $pm
|
|
return
|
|
end
|
|
end
|
|
echo ""
|
|
end
|