feat(fish-deps): resolve real binary past our generated wrapper shims

Add __fish_real_command, which walks all PATH matches for a name and
returns the first that is NOT one of this config's generated wrappers
(identified by the "# <name>-wrapper-version:" marker; grep -I treats
real ELF binaries as no-match so only our text shims are skipped). It
never returns one of our own wrappers, so a caller embedding the result
can't build a shim that recurses into itself.

Use it for the fish-deps status "(Found at ...)" path so paru/yay show
the real binary instead of the ~/.local/bin logging shim.
This commit is contained in:
2026-06-22 02:16:40 -04:00
parent 4a5536aeb6
commit cb30f19c32
2 changed files with 37 additions and 1 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ function _fish_deps_status
end
set_color green; echo -n " ✓ "; set_color normal
echo -n "$bin "
set_color brblack; echo "(Found at "(command -s $bin)")"; set_color normal
set_color brblack; echo "(Found at "(__fish_real_command $bin)")"; set_color normal
else if test "$tier" = rec
set_color yellow; echo -n " ⚠ "; set_color normal
echo -n "$bin "