You are not logged in.

#1 2008-08-01 07:53:10

papierschiff
Member
Registered: 2008-07-09
Posts: 66

pacman wildevards*

hello,
i have the problem, that when i want to remove many packets i must type the whole name.
for example: kdemod-kdegraphics-kpdf

can i write something like kdemo*kpdf or something other?

lg
ps

Offline

#2 2008-08-01 08:08:08

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: pacman wildevards*

Why don't you use bash or zsh tab completion to make that much easier?


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2008-08-01 08:14:03

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: pacman wildevards*

this doesn't work. nothing happen when i use tab. -or what should i do?

Offline

#4 2008-08-01 08:16:28

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: pacman wildevards*

I suppose you use bash then? In this case, try this :
http://wiki.archlinux.org/index.php/Bas … Completion


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2008-08-01 08:22:45

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: pacman wildevards*

ah.. this was it. thanks... so easy if you know it smile

Offline

#6 2008-08-02 09:29:09

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: pacman wildevards*

hej,
i cleaup my system at the moment, and bash-compleshion isn't enough...

for example when i go to my starmenu and see kppp, which i don't need any more. but i can't write pacman -R *kppp*. i must write first pacman -Ss kppp and than i must write pacman -R kdemod[...]kppp

is there an other alternative???

Offline

#7 2008-08-02 09:43:48

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: pacman wildevards*

You can try this

pacman -Rs $(pacman -Qsq kppp)

This just combines the two commands you need into one. But it only works when the search is precise enough, and only returns the packages you want to remove.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#8 2008-08-02 09:48:37

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: pacman wildevards*

hm, this looks not easy to use, but its much better.. thanks.

Offline

#9 2008-08-02 10:12:32

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: pacman wildevards*

You could always add this to your user .bashrc :

pacR() {
        sudo pacman -Rs $(pacman -Qsq $1)
}

or the same without sudo to your root .bashrc, if you run pacman as root.
Then you can just do

pacR kppp

pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#10 2008-08-02 10:37:15

papierschiff
Member
Registered: 2008-07-09
Posts: 66

Re: pacman wildevards*

hehe, this looks nice... i didn't thought that such is so easy with the bash... very cool smile

Offline

Board footer

Powered by FluxBB