Files
dotfiles/dot_config/fish/functions/yy.fish
T

8 lines
209 B
Fish
Raw Normal View History

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