From a1702602bcc0ab07aa3f08ad0bbbc6bfc4b59792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 13 Oct 2024 01:24:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(fish):=20function=20to=20ope?= =?UTF-8?q?n=20yazi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/fish/functions/fe.fish | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) 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