Dan Price wrote:
On Wed 05 Aug 2009 at 03:55PM, Danek Duvall wrote:
I have a feeling that most people who use "pkg contents" just pipe it
through grep or less to look for individual actions if they're looking for
something in particular, but I've been frustrated by the need for that, and
the fact that coming up with the right regular expression is a bit of a
pain ("\<path=[^ ]*/ls", for instance).

So I've been dreaming about an option to contents that allows you to filter
by attribute value.  So I could say, for instance:

    pkg contents -o path,target -a path=\*.desktop openoffice

This seems good.  My main concern, and you touched on this, is that
we're developing two different languages for searching.  One of:

        pkg search -l 'path:*.desktop'

        pkg search -l 'openoffice::path:*.desktop'

Is quite close to the same thing.  While I realize that there are
probably some things that this new contents can find which search
cannot, I just wonder if this is in part papering over some small
usability gap in search...?

I might similarly ask whether contents should simply always query
into search?
Or if it help if we had:

        pkg search -o path,target -l 'openoffice::path:*.desktop'
I definitely plan to add more output options to search so allow the dumping of raw lines, and that was something Danek and I talked about when we were discussing this.
Plus some sorting?
I'm happy to add sorting as a client side feature (with the understanding that if you pkg search -r -R '*' -s name, you might just blow through your memory).

Two things that contents will give that search is unlikely to ever give are a preservation of the ordering of actions in the manifest (it doesn't have practical impact I know, but from a UI perspective, it's probably a nice thing), and any comments that end up in the manifest.

All that said, I'm perfectly happy with Danek's proposed changes to contents.

Brock

        -dp


_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to