added a y.fish function to fish, which works with yazi
This commit is contained in:
parent
c0f6abfc98
commit
255dcbf3df
8
.config/fish/functions/y.fish
Normal file
8
.config/fish/functions/y.fish
Normal file
@ -0,0 +1,8 @@
|
||||
function y
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||
yazi $argv --cwd-file="$tmp"
|
||||
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
builtin cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user