Commit 880b591fccb697d49611f935f112f2f7e88cb5c6 Parent: 6d6187f43d6aadd5600a52567b5f70c14051e6f9 Author: Matt Colligan <matt@edra.ai> Date: 2026-04-29 12:40:10 +0100 Committer: Matt Colligan <matt@edra.ai> Committed: 2026-04-29 12:40:10 +0100 y
functions.zsh Modified
@@ -28,6 +28,14 @@ } fi +function y() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + command yazi "$@" --cwd-file="$tmp" + IFS= read -r -d '' cwd < "$tmp" + [ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd" + rm -f -- "$tmp" +} + shebang() { # create new file, add shebang, and vim touch $1 chmod +x $1