yazi: init
This commit is contained in:
parent
50d8845e06
commit
3ac3a823d1
4 changed files with 73 additions and 0 deletions
8
stow/.config/fish/functions/y.fish
Normal file
8
stow/.config/fish/functions/y.fish
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
function y
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
command yazi $argv --cwd-file="$tmp"
|
||||
if read -z cwd < "$tmp"; and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
builtin cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue