Skip to content

Commit

Permalink
✨ Use paru/yay if installed to see package information
Browse files Browse the repository at this point in the history
  • Loading branch information
willydeliege authored and Freed-Wu committed Aug 30, 2024
1 parent 97f146d commit 3a47f09
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions sources/pacman.zsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# :fzf-tab:complete:(\\|*/|)(pacman|yay):(argument-(rest|1)|option-l-1)
# :fzf-tab:complete:(\\|*/|)(pacman|paru|yay):(argument-(rest|1)|option-l-1)
case $group in
'package file')
less $realpath
Expand All @@ -7,6 +7,12 @@ case $group in
pacman -Qi $word | bat -lyaml
;;
packages)
pacman -Si $word | bat -lyaml
if (($+commands[paru])); then
paru -Si $word | bat -lyaml
elif (($+commands[yay])); then
yay -Si $word | bat -lyaml
else
pacman -Si $word | bat -lyaml
fi
;;
esac

0 comments on commit 3a47f09

Please sign in to comment.