Note that the command echo exists to test such expansions:
port echo depends:expat and 'a*'
Gives you a list of all ports that depend on expat and start with the
character 'a'.

I'm confused why the user has to come up with all these queries rather
than just doing:
port list depends:expat a*

The default logical operator is "or". Your example is equivalent to:
port list depends:expat or 'a*'

If it would default to "and", you would be unable to do things like:
port info vim expat bzip2

Okay, these simple examples above are handled a bit different
internally, but I hope you get the point.

More complicated:
port echo inactive and \(vim expat bzip2\)
which is the simplified form of:
port echo inactive and \(vim or expat or bzip2\)

Note: Use quotes as the shell will also expand wildcards.

It just seems that in order to use these "special features" a lot more work is done by the user each time rather than devoting that energy to
having MacPorts do stuff.  Granted you can write a program to know
what your user is doing.

I don't see where the user has to do more work?

I wouldn't expect any logic operations to actually take place in the examples above. I'd expect it to do the command on each one independently. When it comes across depends:expat (or something else that's a "reserved" name, I would expect it to function according to what the command is, and apply it to the following ports.

port list depends:expat a*

For this, I would expect list to show me what ports starting with a depend on expat. How it goes about it presently is different than i would expect.

port info vim expat bzip2

I would expect port info to be run against vim, then expat, then bzip2.

It's just a matter of how I feel port list works. I clearly misunderstood how it was going about its business.

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

Reply via email to