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

8 lines
216 B
Fish
Raw Normal View History

2026-08-15 19:00:25 -04:00
function y
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
command rm -f -- "$tmp"
end