From 9e7539d8635a3933aa13fd62d6bad2b214285bb0 Mon Sep 17 00:00:00 2001 From: rootiest Date: Mon, 18 May 2026 22:23:10 -0400 Subject: [PATCH] feat(deps): support upgrading fish itself via cargo install fish Fish 4.x is a Rust rewrite published to crates.io as 'fish'. Added the crate to the catalog so fish-deps update will run cargo install --force fish to upgrade it. A yellow restart reminder is printed after the upgrade since the new binary won't take effect until the shell restarts. README warning updated to mention cargo install fish as the upgrade path for users stuck on Fish 3.x. --- README.md | 5 +++++ functions/_fish_deps_catalog.fish | 2 +- functions/_fish_deps_update.fish | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b9053a7..acee522 100644 --- a/README.md +++ b/README.md @@ -502,6 +502,11 @@ Named context shortcuts (e.g. `dcr`, `dck`) live in `~/.config/.user-dots/fish/l > [!WARNING] > Fish **4.0 or newer is required.** This config uses `test` syntax and other constructs that are incompatible with Fish 3.x. Older versions will produce errors on startup. +> If you are on an older Fish, you can upgrade via cargo (Fish 4.x is a Rust rewrite published to crates.io): +> ``` +> cargo install fish +> ``` +> Or run `fish-deps update` once cargo is available — it will upgrade Fish via cargo automatically. ### Recommended diff --git a/functions/_fish_deps_catalog.fish b/functions/_fish_deps_catalog.fish index 5667f11..58105c8 100644 --- a/functions/_fish_deps_catalog.fish +++ b/functions/_fish_deps_catalog.fish @@ -25,7 +25,7 @@ function _fish_deps_catalog rec rec rec rec rec rec rec rec rec rec rec rec rec rec set -g _fdc_cargo \ - "" "" "" starship "" zoxide "" "" \ + fish "" "" starship "" zoxide "" "" \ "" "" \ eza lsd bat "" du-dust "" "" "" ripgrep "" "" trash-cli "" "" diff --git a/functions/_fish_deps_update.fish b/functions/_fish_deps_update.fish index 35d2b14..eff4cdd 100644 --- a/functions/_fish_deps_update.fish +++ b/functions/_fish_deps_update.fish @@ -75,6 +75,11 @@ function _fish_deps_update echo "Updating $bin..." cargo install --force $cargo_crate set updated_any 1 + if test "$bin" = fish + set_color yellow + echo " Fish updated — restart your shell to use the new version." + set_color normal + end set i (math $i + 1) continue end