From f6e6765825ef9f170014c913841c96526140c894 Mon Sep 17 00:00:00 2001 From: Trumeet <17158086+Trumeet@users.noreply.github.com> Date: Thu, 14 Nov 2019 18:18:14 -0800 Subject: fix(fish): cleanup command --- fish/.config/fish/functions/cleanup.fish | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fish/.config/fish/functions/cleanup.fish b/fish/.config/fish/functions/cleanup.fish index ca6b025..caeed9d 100644 --- a/fish/.config/fish/functions/cleanup.fish +++ b/fish/.config/fish/functions/cleanup.fish @@ -1,7 +1,8 @@ function cleanup --description "Remove unused dependencies" - if test -n (pacman -Qttdq) - echo "Nothing to do here." + set PKGS (pacman -Qttdq) + if test -n "$PKGS" + sudo pacman -Rn $PKGS else - sudo pacman -Rn (pacman -Qttdq) + echo "Nothing to do here." end end -- cgit v1.2.3