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.
I don't know why that would be confusing. If you'd done :file::vim, then
it would work. If you want to use a structured search, then it matters
what value you put in what field.
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 ;)
You have a perceived interface here, of
"shove stuff in between ::, to be modifiers to searches", where
"stuff" appears to be keyword
types.
":file:" seems to be a reasonably expected keyword, with a reasonably
expected "i should
not have to read a manpage I know what file means already" definition
for it.
There's also another whole issue of interface, where it might be seen
as more user understandable to have a command line option for this
stuff, rather than special
in-line-search encoding.
eg:
pkg search -k basename vim
(-k for key, keyword, or whatever you prefer)
If we ever decide that search needs a large rework from the ground up,
the ui would likely get changed. It was based on the dtrace syntax,
which has not been as friendly as we'd hoped.
Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss