added a y.fish function to fish, which works with yazi

This commit is contained in:
Christian Figueroa 2025-04-27 05:06:43 -07:00
parent c0f6abfc98
commit 255dcbf3df

View File

@ -0,0 +1,8 @@
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