On 4/18/12 2:42 PM, Shawn Walker wrote:
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

Problem is, this not consistent design, at least from a user point of view.
From a programmer's point of view sure, but not a users.
Interestingly, you cut your quote of the documentaiton off right at the most relevant part to this issue.

Yes there is this documented syntax of
pkg search ww:xx:yy:zz

BUT, it is also documented in the bit you _cut off_ :p that pkg search is supposed to "implicitly wildcard" missing fields.

Brock's explanation of, "[well, you have to explicitly provide a missing field, and then it works]", ie

pkg search :file::vim

conflicts with that documented principle, and the working examples with basename
and path.

if "pkg search" is "Intelligent" enough to auto-expand

basename:vim   => ::basename:vim

it should be just as equally capable of auto-expanding

file:vim  => :file::vim

To not do so, may justify some pretty Backus-Naur grammar definition, but it is
horrible real world user interface!

On 4/18/12 2:39 PM, Brock Pytlik wrote:
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.

Well that explains... a lot :-/
Never a good idea to take a *programmer* interface, and abuse it as an end-user
interface :(

But anyways, you might at least make the simple improvement above that I mentioned. Even if you have to explicit-special-case it in the code. Then from a users point of view, it then becomes a much more sensibly behaving tool.




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

Reply via email to