Bug 694831

Summary: Implement abrt-cli -i -o/-O elem1,elem2,elem3
Product: [Fedora] Fedora Reporter: Denys Vlasenko <dvlasenk>
Component: abrtAssignee: abrt <abrt-devel-list>
Status: CLOSED DEFERRED QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: rawhideCC: anton, dvlasenk, iprikryl, jfilak, jmoskovc, kklic, mtoman, npajkovs, rmarko
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-10 11:02:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 744774    

Description Denys Vlasenko 2011-04-08 14:42:16 UTC
abrt-cli -i needs -o elem1,elem2,elem3 option which tells which elements to
show, and/or -O elem1,elem2,elem3 option which tells elements to NOT
show. Rationale: abrt-cli -i --full output is way too long because of
smaps, need a way to suppress unneeded elements display.

Comment 1 Fedora Admin XMLRPC Client 2011-12-19 17:41:11 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 2 Fedora Admin XMLRPC Client 2011-12-19 17:44:37 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Richard Marko 2012-03-19 12:49:32 UTC
(In reply to comment #0)
> Rationale: abrt-cli -i --full output is way too long because of
> smaps, need a way to suppress unneeded elements display.

For me it's easier to use grep/egrep to filter (un)wanted fields than to remember option, format and field names to filter.

For example:
  - instead of abrt-cli list --full -o time,dir you can use

    abrt-cli list --full | egrep -i "time|dir"


  - and instead of abrt-cli list --full -O time,dir you can use

    abrt-cli list --full | egrep -vi "time|dir"

What do you think?

Comment 4 Jakub Filak 2012-04-04 10:27:55 UTC
(In reply to comment #3)
> For example:
>   - instead of abrt-cli list --full -o time,dir you can use
> 
>     abrt-cli list --full | egrep -i "time|dir"

I guess, you should use a little bit extended egrep command, because the used one breaks the output format.

The following command doesn't break anything and gives exactly the same output which was firstly required.

      abrt-cli list --full | egrep -i --color=never "(^(@|time|dir))|(^$)"

IMHO this way is pretty inconvenient when you want to run the command by the exec() functions.