🐛 fix(fish): function to open yazi
This commit is contained in:
parent
c2d6c8a20a
commit
a1702602bc
1 changed files with 5 additions and 9 deletions
|
@ -1,12 +1,8 @@
|
||||||
function fe
|
function fe
|
||||||
if type -f yazi &>/dev/null
|
set tmp (mktemp -t "yazi-cwd.XXXXXX")
|
||||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
yazi $argv --cwd-file="$tmp"
|
||||||
yazi --cwd-file="$tmp"
|
if set cwd (command cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
builtin cd -- "$cwd"
|
||||||
cd -- "$cwd"
|
|
||||||
end
|
end
|
||||||
rm -f -- "$tmp"
|
rm -f -- "$tmp"
|
||||||
else
|
|
||||||
missing_package yazi
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue