fix(deps): fix autoloading and Fish 4.x test compatibility
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.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user