mirror of
https://github.com/kristoferssolo/solorice.git
synced 2026-03-18 08:09:40 +00:00
14 lines
440 B
Fish
14 lines
440 B
Fish
function yazicd --description "yazi wrapper that cd's to last directory"
|
|
set -l tmp (mktemp -t "yazi-cwd.XXXXXX")
|
|
command yazi $argv --cwd-file="$tmp"
|
|
if read -z cwd < "$tmp"; and [ "$cwd" != "$PWD" ]; and test -d "$cwd"
|
|
z -- "$cwd"
|
|
eza -a --icons --group-directories-first
|
|
end
|
|
rm -f -- "$tmp" >/dev/null
|
|
|
|
# restore insert cursor (beam)
|
|
printf '\e[5 q'
|
|
commandline -f repaint 2>/dev/null
|
|
end
|