This commit is contained in:
2025-02-08 22:00:28 -05:00
parent 574d2a8622
commit 0d5f57e367
2 changed files with 9 additions and 1 deletions

View File

@@ -46,4 +46,13 @@ function clip() {
cat $1 | clip.exe
}
function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
yazi "$@" --cwd-file="$tmp"
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
builtin cd -- "$cwd"
fi
rm -f -- "$tmp"
}
if [ "$TMUX" = "" ]; then tmux; fi