Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447006 - app-portage/portage-utils: qgrep: should parse multiple args over entire file for broader search results
Summary: app-portage/portage-utils: qgrep: should parse multiple args over entire file...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Fabian Groffen
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 14:12 UTC by Pariksheet Nanda
Modified: 2018-03-31 18:42 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pariksheet Nanda 2012-12-12 14:12:20 UTC
qgrep should default to searching multiple arguments anywhere in a file.

Reproducible: Always

Steps to Reproduce:
Run `grep cmake-utils swig`
Actual Results:  
No result is found

Expected Results:  
qgrep should search for both search terms in the file such as:
grep -rl 'cmake-utils' --include '*.ebuild' /usr/portage | xargs grep -l 'swig'
Comment 1 Fabian Groffen gentoo-dev 2018-03-31 18:42:39 UTC
Ok, I see what you want, but grep doesn't support this behaviour either.  Instead, it allows you to use alternatives in your regex argument, e.g. grep -E '(a|b)'.  Since qgrep supports regexes, you can just do the same.

In your scenario:

qgrep -x '(cmake-utils|swig)'