diff options
author | Trumeet <17158086+Trumeet@users.noreply.github.com> | 2019-11-14 18:18:14 -0800 |
---|---|---|
committer | Trumeet <17158086+Trumeet@users.noreply.github.com> | 2019-11-14 18:18:14 -0800 |
commit | f6e6765825ef9f170014c913841c96526140c894 (patch) | |
tree | 1ea3f55597faca03b40455d71f201844461ab990 | |
parent | b58d887bb994152cf5c752eec60471ae2c014dc6 (diff) | |
download | dotfiles-f6e6765825ef9f170014c913841c96526140c894.tar dotfiles-f6e6765825ef9f170014c913841c96526140c894.tar.gz dotfiles-f6e6765825ef9f170014c913841c96526140c894.tar.bz2 dotfiles-f6e6765825ef9f170014c913841c96526140c894.zip |
fix(fish): cleanup command
-rw-r--r-- | fish/.config/fish/functions/cleanup.fish | 7 |
1 files 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 |