function yazi-cd set tmpfile (mktemp) yazi --cwd-file="$tmpfile" if test -s "$tmpfile" cd (cat "$tmpfile") end rm -f "$tmpfile" end