You are not logged in.
I want to install the group plasma that has 42 members. Is there a pacman command or stringed together commands to see each member and it's description so I can know which of them I want to get?
:: There are 42 members in group plasma:
:: Repository extra
1) bluedevil 2) breeze 3) breeze-gtk 4) discover 5) drkonqi 6) kactivitymanagerd 7) kde-cli-tools 8) kde-gtk-config
9) kdecoration 10) kdeplasma-addons 11) kgamma5 12) khotkeys 13) kinfocenter 14) kmenuedit 15) knetattach 16) kscreen
17) kscreenlocker 18) ksshaskpass 19) ksysguard 20) kuiserver 21) kwallet-pam 22) kwayland-integration 23) kwin
24) kwrited 25) libkscreen 26) libksysguard 27) milou 28) oxygen 29) plasma-desktop 30) plasma-integration
31) plasma-nm 32) plasma-pa 33) plasma-sdk 34) plasma-vault 35) plasma-workspace 36) plasma-workspace-wallpapers
37) polkit-kde-agent 38) powerdevil 39) sddm-kcm 40) systemsettings 41) user-manager 42) xdg-desktop-portal-kde
Enter a selection (default=all):
Offline
There is probably a more elegant solution, but quick n' dirty and before I've had my AM coffee:
#!/bin/bash
arr=( $(pacman -Sg plasma | awk '{ print $2 }' | sed ':a;N;$!ba;s/\n/ /g') )
for i in "${arr[@]}"; do
pacman -Ss "$i"
done
EDIT: no, that doesn't work as expected since it's a wildcard search.
Last edited by graysky (2018-04-22 10:48:11)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
pacman -Si $(pacman -Sqg plasma) | grep -E "^Name|^Desc"
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Whoa, holy useless pipeline batman!
pacman -Sg plasma | awk '{ print $2;}'
# no, that should be the following
pacman -Sgq plasma
# as for that sed line, that's a horrific way to just remove newlines. The following could suffice
pacman -Sgq plasma | tr '\n' ' '
# of course this is also completely pointless as this will work too
arr=( $(pacman -Sgq plasma) )
But while a for loop through the contents of that array will get the job done, this seems much cleaner to me:
pacman -Si $(pacman -Sgq plasma) | sed -n 's/^Name *: //p;s/^Description *: /\t/p'
You could adjust the sed command if you really wanted pacman-like coloring.
Also the while loop could work, but the internals should not be `pacman -Ss` as that will return *far* to many false-positive results.
Last edited by Trilby (2018-04-22 10:55:49)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
expac -Sg "%n: %d" plasma
Offline
Not as fast as expac, but if you want to get the same result with sed (without requiring expac):
zcat /var/lib/pacman/sync/*.db | sed -n '/%NAME%/{n;h;} /%DESC%/{n;H;} /%GROUPS%/{n;/plasma/{x;s/\n/: /p;}}'
Last edited by Trilby (2018-04-22 15:25:40)
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online