Files
nixos/scripts/fish-functions/yazi.fish
2026-10-06 22:34:05 +02:00

8 lines
212 B
Fish

set tempfile (mktemp -t "yazi-cwd.XXX")
command yazi $argv --cwd-file=$tempfile
if read -z cwd < "$tempfile"; and [ "$cwd" != "$PWD" ]; and test -d "$cwd"
builtin cd -- "$cwd"
end
command rm -f -- "$tempfile"