You are not logged in.

#1 2011-11-29 15:29:23

jinleileiking
Member
Registered: 2011-05-28
Posts: 51

[pacman] what is the regex standard of pacman -Ss?

Can -Ss search only tool's name?

Thanks

Offline

#2 2011-11-29 15:41:10

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [pacman] what is the regex standard of pacman -Ss?

Have you tried expac?
'expac %n -S | grep <name>'


Edit: 'pacman -Sqs <name> | grep <name>' works too.

Last edited by karol (2011-11-29 15:44:13)

Offline

#3 2011-11-29 15:45:17

jinleileiking
Member
Registered: 2011-05-28
Posts: 51

Re: [pacman] what is the regex standard of pacman -Ss?

@karol what about the regex standart for pacman ?

Offline

#4 2011-11-29 15:47:52

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [pacman] what is the regex standard of pacman -Ss?

jinleileiking wrote:

@karol what about the regex standart for pacman ?

pacman searches the whole output of 'pacman -Si' / 'pacman -Qi' so grepping the output is a way of limiting search to e.g. just the name.
You can check the source code to see how it does it exactly.

Offline

#5 2011-11-30 05:49:31

jinleileiking
Member
Registered: 2011-05-28
Posts: 51

Re: [pacman] what is the regex standard of pacman -Ss?

But in man pacman:


-s, --search <regexp>
           Search each locally-installed package for names or descriptions that match regexp. When including multiple search terms, only packages with descriptions
           matching ALL of those terms are returned.

Offline

#6 2011-11-30 05:50:03

jinleileiking
Member
Registered: 2011-05-28
Posts: 51

Re: [pacman] what is the regex standard of pacman -Ss?

karol wrote:

Have you tried expac?
'expac %n -S | grep <name>'


Edit: 'pacman -Sqs <name> | grep <name>' works too.

pacman -Sqs is a better solution

Offline

Board footer

Powered by FluxBB