add yazi
This commit is contained in:
parent
b67202d535
commit
c407dd3bfb
1 changed files with 8 additions and 0 deletions
8
zsh/yazi.zsh
Normal file
8
zsh/yazi.zsh
Normal file
|
@ -0,0 +1,8 @@
|
|||
function ya() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXX")"
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
cd -- "$cwd"
|
||||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
Loading…
Add table
Reference in a new issue