feat(deps): add fish-deps unified dependency management command
Introduces `fish-deps` with four subcommands: - status: colored installed/missing report per tier (required/integrations/recommended) - install: interactively install each missing dep, prompts method when multiple exist - update: update all installed deps using their preferred method - sync: install missing then update installed Install method priority: cargo (Rust tools get latest crate) > system PM (paru/pacman/apt/brew/pkg/dnf/yum) > git clone (fzf via fzf-update) > curl installer (starship, fisher) > pipx (wakatime). Splits into focused helper files: - _fish_deps_catalog.fish: parallel-array dep catalog with tiers, cargo crates, PM names, special install keys - _fish_deps_pm.fish: PM detection and install/upgrade helpers - _fish_deps_status.fish: tier-grouped colored status display - _fish_deps_install.fish: per-dep interactive install with method selection - _fish_deps_update.fish: per-dep update using known install method check_fish_deps becomes a thin wrapper delegating to `fish-deps status`. README updated with Dependency Management section.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# Copyright (C) 2026 Rootiest
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
# Print colored installed/missing status for all deps, grouped by tier.
|
||||
function _fish_deps_status
|
||||
_fish_deps_catalog
|
||||
|
||||
function __fds_print_dep --argument-names bin
|
||||
if type -q $bin
|
||||
set_color green; echo -n " "; set_color normal
|
||||
echo -n "$bin "
|
||||
set_color brblack; echo "(Found at "(type -p $bin)")"; set_color normal
|
||||
else
|
||||
set_color red; echo -n " "; set_color normal
|
||||
echo -n "$bin "
|
||||
set_color brblack; echo "(Not installed)"; set_color normal
|
||||
end
|
||||
end
|
||||
|
||||
for tier_label in "Required Dependencies:req" "Integrations:int" "Recommended Dependencies:rec"
|
||||
set -l label (string split : $tier_label)[1]
|
||||
set -l tier (string split : $tier_label)[2]
|
||||
set_color cyan; echo $label; set_color normal
|
||||
set -l i 1
|
||||
for bin in $_fdc_bins
|
||||
if test "$_fdc_tiers[$i]" = $tier
|
||||
__fds_print_dep $bin
|
||||
end
|
||||
set i (math $i + 1)
|
||||
end
|
||||
echo ""
|
||||
end
|
||||
|
||||
functions -e __fds_print_dep
|
||||
end
|
||||
Reference in New Issue
Block a user