diff --git a/.config/fish/functions/fe.fish b/.config/fish/functions/fe.fish index b16d6abd..e213b015 100644 --- a/.config/fish/functions/fe.fish +++ b/.config/fish/functions/fe.fish @@ -1,12 +1,8 @@ function fe - if type -f yazi &>/dev/null - 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" - else - missing_package yazi + 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