[147562] branches/portgroups-selector/base/src/port/port.tcl
Rainer Müller
raimue at macports.org
Sat Apr 9 07:58:00 PDT 2016
On 04/08/2016 07:16 PM, Mojca Miklavec wrote:
> I would also say that "port" is a tiny bit redundant (but wouldn't
> mind any of the two – either group or portgroup). But my preference
> would be to keep just one if possible, otherwise it might lead to more
> confusion than actual benefits. (Do you plan to introduce "groups" for
> something else in the future? :)
For example, we also use the term "select groups", so it might already be
ambiguous for users...?
I think I am kind of looking for arguments to justify dropping the portgroups:,
although it is the internal name. Using groups: would be more concise.
> Would this be used as
> port echo group:github
> or also as
> port echo group[s]:github,cmake
> (the second one would probably be a logical expression composed of
> "group:github and group:cmake")
>
> Unless it's the second case, I would keep the word in singular. My
> intuitive interpretation would be that "groups" would be used as
> port echo groups:gnuplot
> to list the portgroups being used by a port.
All of the existing pseudo-port selectors are available in both singular and
plural forms (category/categories, platform/platforms, subport/subports, etc.).
They all have the same behavior and match against the value of the field in
PortIndex. I would add the new pseudo-port selector for port groups the same way
for consistency.
Although I like the idea of using something like groups:github,cmake. The
argument to the selector is currently always a regex. Changing the syntax
according to the selector might make sense, but would be a project which should
be done together with the other selectors (depends: with multiple port names,
categories:, variants:, etc.)
The latter could also address and solve the problem that the pseudo-port
selectors do not really allow exact matches, which is especially a problem for
short port names (like depends:R).
> On the ticket you in fact mentioned
> port info --groups <name-of-port>
>
> For that use plural form makes more sense.
Long options can always be abbreviated as long as they are unambiguous. That has
the side-effect that --group would always mean --groups, regardless of it being
an explicit long option.
Rainer
More information about the macports-dev
mailing list