3 ms·
Gah. I need to skim better. Thanks. Here is a translation for anyone else who uses fish. Just hit it with a :%s/^\n//g to fix the formatting. # Rename this fil
by BaculumMeumEst 3y ago
Gah. I need to skim better. Thanks. Here is a translation for anyone else who uses fish. Just hit it with a :%s/^\n//g to fix the formatting.
# Rename this file to match the name of the function
# e.g. ~/.config/fish/functions/ya.fish
# or, add the lines to the 'config.fish' file.
function ya
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi --cwd-file="$tmp"
if set cwd (cat -- "$tmp") && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]
cd -- "$cwd"
end
rm -f -- "$tmp"
end