fish-shell/share/functions/__fish_indent.fish
Johannes Altmanninger edaf011ab1
Some checks failed
Rust checks / clippy (push) Has been cancelled
make test / ubuntu (push) Has been cancelled
make test / ubuntu-32bit-static-pcre2 (push) Has been cancelled
make test / ubuntu-asan (push) Has been cancelled
make test / macos (push) Has been cancelled
Rust checks / rustfmt (push) Has been cancelled
Try to use the fish_indent that corresponds to the fish binary
Users may install two versions of fish and configure their terminal to run
the one that is second in $PATH.  This is not really what I'd do but it
seems reasonable.  We should not need $PATH for this.

Fixes #10770
2024-10-10 05:18:35 +02:00

9 lines
214 B
Fish

function __fish_indent
set -l dir "$(path dirname -- (status fish-path 2>/dev/null))"
if command -v $dir/fish_indent >/dev/null
$dir/fish_indent $argv
else
fish_indent $argv
end
end