8 lines
210 B
Fish
8 lines
210 B
Fish
function y
|
|
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
|