On 04/18/12 13:40, Philip Brown wrote:
On 4/18/12 1:15 PM, Shawn Walker wrote:

If you wanted to limit the search to just 'files', then you could also
specify the action type 'file':

$ pkg search -o path,pkg.name -l :file:basename:vim
PATH PKG.NAME
usr/bin/vim editor/vim/vim-core

An additional comment:
I find it confusing, that

pkg search :file:basename:vim
works, and

pkg search :basename:vim
works, but

pkg search :file:vim

does not work.

Because that syntax is wrong. You specified :key:token, not :action_type:key:token.

There may be a pkg related explaination for this behaviour, along the
lines of
"well, in IPS land, ':file:' doesnt actually mean file, it means...."

but speaking as a plain user, in my opinion, "file", should always
mean.... "file".
I'm sorry if this is revolutionary thinking, but that's just my opinion ;)

I don't see how; 'file' always means 'file', but the meaning of the search tokens you specify is determined by position. This is documented in pkg(1) like this:

         Boolean search using AND and OR is supported. Field,  or
         structured,  queries are supported. The syntax for these
         is pkg_name:action_type:key:token.  Missing  fields  are

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

Reply via email to