✨ feat(fish): yazi wrapper for exiting on the current dir
This commit is contained in:
parent
1ee0f0e664
commit
fb9af295e0
1 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
|||
function fe --wraps=yazi --description 'alias fe=yazi'
|
||||
yazi $argv
|
||||
|
||||
function fe
|
||||
set tmp (mktemp -t "yazi-cwd.XXXXX")
|
||||
yazi --cwd-file="$tmp"
|
||||
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
|
||||
cd -- "$cwd"
|
||||
end
|
||||
rm -f -- "$tmp"
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue