mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
9 lines
209 B
Fish
9 lines
209 B
Fish
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
|