Files
fish-config/functions/_fish_deps_catalog.fish
T
rootiest 36a303f7d4 fix(deps): demote cargo/starship to rec, remove fisher from catalog
Required tier is now fish, fzf, and zoxide only — the tools the config
meaningfully can't function without. Everything else degrades gracefully.

- cargo: only used by fish-deps to install Rust tools or build fish from
  source; all paths are already gated on type -q cargo
- starship: type -q guard in conf.d/starship.fish; shell falls back to
  fish's built-in prompt without it
- fisher: auto-bootstrapped by first_run.fish; no need for users or
  fish-deps to manage it. Remove from catalog and clean up the now-dead
  fisher-bootstrap/special-fisher installer cases.

Catalog arrays verified aligned at 26 entries each.
2026-06-11 23:50:37 -04:00

69 lines
1.9 KiB
Fish

# Copyright (C) 2026 Rootiest
# SPDX-License-Identifier: AGPL-3.0-or-later
# SYNOPSIS
# _fish_deps_catalog
#
# DESCRIPTION
# Populates parallel global arrays (_fdc_bins, _fdc_tiers, _fdc_cargo,
# _fdc_pm, _fdc_special) describing every managed shell dependency.
# Must be called before accessing any _fdc_* array.
#
# EXAMPLE
# _fish_deps_catalog
# echo $_fdc_bins
function _fish_deps_catalog
set -g _fdc_bins \
uv cargo fish starship fzf zoxide direnv paru yay \
wakatime tailscale \
eza lsd bat btop dust duf prettyping ov rg lazygit lazydocker trash kitty wezterm python3
set -g _fdc_tiers \
rec rec req rec req req rec rec rec \
int int \
rec rec rec rec rec rec rec rec rec rec rec rec rec rec rec
set -g _fdc_cargo \
"" "" "" starship "" zoxide "" "" "" \
"" "" \
eza lsd bat "" du-dust "" "" ov ripgrep "" "" trashy "" "" ""
set -g _fdc_pm \
uv cargo fish starship fzf zoxide direnv "" yay \
wakatime tailscale \
eza lsd bat btop dust duf prettyping ov ripgrep lazygit lazydocker trash kitty wezterm python
set -g _fdc_special \
curl-uv rustup-installer git-cargo-fish curl-installer fzf-update "" "" paru-build yay-build \
wakatime-binary "" \
"" "" "" "" "" "" "" "" "" "" curl-lazydocker "" "" "" ""
end
# SYNOPSIS
# _fish_deps_catalog_idx <bin>
#
# DESCRIPTION
# Returns the 1-based index of a binary name in the _fdc_bins catalog array,
# or an empty string if the binary is not found.
#
# ARGUMENTS
# bin The binary name to look up in the catalog
#
# RETURNS
# 0 Index printed to stdout
# 1 Binary not found (empty output)
#
# EXAMPLE
# _fish_deps_catalog_idx fzf
function _fish_deps_catalog_idx --argument-names bin
_fish_deps_catalog
set -l i 1
for b in $_fdc_bins
if test "$b" = "$bin"
echo $i
return
end
set i (math $i + 1)
end
end