1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-24 04:21:31 +01:00

zsh: add pacman module

This commit is contained in:
bretello 2023-09-15 00:32:28 +02:00
parent 51f92885fe
commit b96f0a6f86
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

9
functions/pacman.zsh Normal file
View File

@ -0,0 +1,9 @@
if ! command -v pacman &>/dev/null; then return; fi
function pacpreview() {
if ! command -v fzf &>/dev/null; then
echo "Requires fzf! Quitting"
return 1
fi
pacman -Slq | fzf --multi --preview 'grc --colour=on pacman -Si {1}' | xargs -ro sudo pacman -S
}