From a70e88c3446fee5ea6b13025fcc21dd2028a02df Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 18 May 2026 22:13:13 -0400 Subject: [PATCH] fix(deps): remove paru install, enforce cargo preference for Rust tools Catalog: clear paru's pm and special install entries so it appears in status but fish-deps install skips it (it's a package manager, not a managed dep). Install: cargo is now always attempted first for Rust tools. When cargo is absent but a crate exists, a note is printed suggesting rustup. When only one method is available the chosen method is shown so the user can see whether cargo or the system PM is being used. Method prompt now shows the default label inline for clarity. Removed dead paru-build switch case from the install executor. --- functions/_fish_deps_catalog.fish | 6 ++--- functions/_fish_deps_install.fish | 41 ++++++++++++------------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/functions/_fish_deps_catalog.fish b/functions/_fish_deps_catalog.fish index aab7ecc..7b639b6 100644 --- a/functions/_fish_deps_catalog.fish +++ b/functions/_fish_deps_catalog.fish @@ -10,7 +10,7 @@ # _fdc_cargo — cargo crate name, or "" if not on crates.io # _fdc_pm — system PM package name, or "" if not in repos # _fdc_special — special install key: fisher-bootstrap | fzf-update | -# paru-build | pipx | curl-installer | "" (none) +# pipx | curl-installer | "" (none) function _fish_deps_catalog set -g _fdc_bins \ fish fisher starship fzf zoxide direnv paru \ @@ -28,12 +28,12 @@ function _fish_deps_catalog eza lsd bat "" du-dust "" "" "" ripgrep "" "" trash-cli "" "" set -g _fdc_pm \ - fish "" starship fzf zoxide direnv paru \ + fish "" starship fzf zoxide direnv "" \ wakatime tailscale \ eza lsd bat btop dust duf prettyping most ripgrep lazygit lazydocker trash kitty wezterm set -g _fdc_special \ - "" fisher-bootstrap curl-installer fzf-update "" "" paru-build \ + "" fisher-bootstrap curl-installer fzf-update "" "" "" \ pipx "" \ "" "" "" "" "" "" "" "" "" "" "" "" "" "" end diff --git a/functions/_fish_deps_install.fish b/functions/_fish_deps_install.fish index 307ad9b..c34b903 100644 --- a/functions/_fish_deps_install.fish +++ b/functions/_fish_deps_install.fish @@ -20,13 +20,19 @@ function _fish_deps_install set -l methods set -l method_labels - # Cargo — only if cargo is present and the tool has a crate - if test -n "$cargo_crate"; and type -q cargo - set -a methods cargo - set -a method_labels "cargo ($cargo_crate)" + # Cargo first — preferred for Rust tools; gets the latest crate version + if test -n "$cargo_crate" + if type -q cargo + set -a methods cargo + set -a method_labels "cargo ($cargo_crate)" + else + set_color brblack + echo " note: cargo not found — install rustup for the latest $bin" + set_color normal + end end - # System PM — only if a PM is detected and the tool is in repos + # System PM — after cargo so cargo is always the default when available if test -n "$pm_pkg"; and test -n "$pm" set -a methods pm set -a method_labels "$pm ($pm_pkg)" @@ -43,15 +49,6 @@ function _fish_deps_install case curl-installer set -a methods special-curl set -a method_labels "curl installer" - case paru-build - if type -q yay - set -a methods special-yay-paru - set -a method_labels "yay -S paru" - end - if type -q pacman - set -a methods special-paru - set -a method_labels "build from AUR (makepkg)" - end case pipx if type -q pipx set -a methods special-pipx @@ -83,13 +80,16 @@ function _fish_deps_install echo " Available methods:" set -l m 1 for lbl in $method_labels - echo " $m) $lbl" + set_color brblack; echo -n " $m) "; set_color normal + echo $lbl set m (math $m + 1) end - read -l -P " Choose [1-"(count $methods)"] (default 1): " _choice + read -l -P " Choose [1-"(count $methods)"] (default 1 = $method_labels[1]): " _choice if test -n "$_choice"; and test "$_choice" -ge 1; and test "$_choice" -le (count $methods) set chosen_method $methods[$_choice] end + else + set_color brblack; echo " Installing via $method_labels[1]"; set_color normal end # Execute chosen method @@ -107,15 +107,6 @@ function _fish_deps_install if test "$bin" = starship curl -sS https://starship.rs/install.sh | sh end - case special-yay-paru - yay -S --noconfirm paru - case special-paru - set -l _build_dir (mktemp -d) - git clone https://aur.archlinux.org/paru.git $_build_dir - and pushd $_build_dir - and makepkg -si --noconfirm - and popd - rm -rf $_build_dir case special-pipx pipx install $bin case special-pip