FollieHiyuki-dotfiles/home/.local/bin/fzf/fzyay
2021-03-23 01:38:14 +03:00

19 lines
371 B
Bash
Executable File

#!/bin/sh
if [ -z "$1" ]
then
echo "Usage:
-i : install a package
-u : uninstall a package"
else
if [ "$1" = "-i" ]
then
yay -Slq | fzf --multi --preview 'yay -Si {1}' | xargs -ro yay -S
elif [ "$1" = "-u" ]
then
yay -Qq | fzf --multi --preview 'cat <(yay -Si {1}) <(yay -Fl {1} | awk "{print \$2}")' | xargs -ro yay -Rns
else
exit 1
fi
fi