dotfiles/.config/fish/functions/fe.fish
2024-10-13 01:24:06 +02:00

8 lines
232 B
Fish

function fe
set tmp (mktemp -t "yazi-cwd.XXXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
builtin cd -- "$cwd"
end
rm -f -- "$tmp"
end