This commit is contained in:
js0ny 2025-05-13 21:00:13 +01:00
parent 31fde92975
commit f4e142e83e
6 changed files with 20 additions and 7 deletions

View file

@ -167,3 +167,11 @@ function __last_history_item; echo $history[1]; end
abbr -a !! --position anywhere --function __last_history_item
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