port search --maintainer[s]

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

port search --maintainer[s]

Jan Stary
This is 2.4.99 from git running on 10.6.8.
The 'port search' recognizes '--maintainer' and '--maintainers',
but the guide says '--maintainer' and '--maintainer'
while port-search.1 only says '--maintainer'.
Attached please find a diff for each.

There is also port-search.1.txt in git, which gets out of sync with this.
Why are the generated *.txt files in the repository?

        Jan

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: port search --maintainer[s]

Jan Stary
(Sorry, attaching now).

On Mar 30 18:18:41, [hidden email] wrote:

> This is 2.4.99 from git running on 10.6.8.
> The 'port search' recognizes '--maintainer' and '--maintainers',
> but the guide says '--maintainer' and '--maintainer'
> while port-search.1 only says '--maintainer'.
> Attached please find a diff for each.
>
> There is also port-search.1.txt in git, which gets out of sync with this.
> Why are the generated *.txt files in the repository?
>
> Jan
>

man.diff (527 bytes) Download Attachment
guide.diff (694 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: port search --maintainer[s]

Joshua Root-8
In reply to this post by Jan Stary
On 2017-3-31 03:18 , Jan Stary wrote:
> Why are the generated *.txt files in the repository?

The .txt files are not generated; they are in asciidoc format and the
other versions are generated from them.

- Josh
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: port search --maintainer[s]

Rainer Müller-4
In reply to this post by Jan Stary
[sending again with correct list address]

On 03/30/2017 06:18 PM, Jan Stary wrote:
> This is 2.4.99 from git running on 10.6.8.
> The 'port search' recognizes '--maintainer' and '--maintainers',
> but the guide says '--maintainer' and '--maintainer'
> while port-search.1 only says '--maintainer'.
> Attached please find a diff for each.

Note that all long options can be shortened as long as they are unique, so you
could even use 'port search --maint foobar'. Maybe we want to simplify the code
and leave out the explicit singular forms (although we cannot do that for
"categories")?

These friendly field names are mapped like this in multiple places, for example
also for pseudo-port selectors in 'port echo maintainer:foobar'.

https://github.com/macports/macports-base/blob/eed6ffce1ca194b803abe429180ccbbce25f013d/src/port/port.tcl#L237-L257

> There is also port-search.1.txt in git, which gets out of sync with this.
> Why are the generated *.txt files in the repository?

It is actually the other way around. See my other mail.

Rainer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: port search --maintainer[s]

Jan Stary
In reply to this post by Jan Stary
On Mar 30 21:06:59, [hidden email] wrote:
> On 03/30/2017 06:18 PM, Jan Stary wrote:
> > This is 2.4.99 from git running on 10.6.8.
> > The 'port search' recognizes '--maintainer' and '--maintainers',
> > but the guide says '--maintainer' and '--maintainer'
> > while port-search.1 only says '--maintainer'.
> > Attached please find a diff for each.
>
> Note that all long options can be shortened as long as they are unique, so you
> could even use 'port search --maint foobar'.

$ port search --maint mandoc
Error: "port search --maint" is ambiguous:
  port search --maintainer
  port search --maintainers

> Maybe we want to simplify the code
> and leave out the explicit singular forms (although we cannot do that for
> "categories")?

I don't understand why there is more then one at all.

Anyway, the "--maintainer, --maintainer" in the guide cannot be right,
and the port-search manpage does mention e.g. *--variant*, *--variants*::
so why should --maintainer(s) be different?

        Jan

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: port search --maintainer[s]

Rainer Müller-4
On 2017-03-30 23:44, Jan Stary wrote:

> On Mar 30 21:06:59, [hidden email] wrote:
>> On 03/30/2017 06:18 PM, Jan Stary wrote:
>>> This is 2.4.99 from git running on 10.6.8.
>>> The 'port search' recognizes '--maintainer' and '--maintainers',
>>> but the guide says '--maintainer' and '--maintainer'
>>> while port-search.1 only says '--maintainer'.
>>> Attached please find a diff for each.
>>
>> Note that all long options can be shortened as long as they are unique, so you
>> could even use 'port search --maint foobar'.
>
> $ port search --maint mandoc
> Error: "port search --maint" is ambiguous:
>   port search --maintainer
>   port search --maintainers

Sorry, that's what happens when I do not test my examples...

>> Maybe we want to simplify the code
>> and leave out the explicit singular forms (although we cannot do that for
>> "categories")?
>
> I don't understand why there is more then one at all.

In natural language you would use either singular or plural, depending
on the way it is used in a query. The port command just tries to be as
convenient as possible.

> Anyway, the "--maintainer, --maintainer" in the guide cannot be right,
> and the port-search manpage does mention e.g. *--variant*, *--variants*::
> so why should --maintainer(s) be different?

I did not mean that this was right. Apparently the other cases are
already covered, so I just applied these changes.

https://github.com/macports/macports-base/commit/9de94319489d80b9aacff5f05b92375c7673c56c

https://github.com/macports/macports-guide/commit/663338ef8d442e4908f21ac7d04d7ba368cef4c7

Rainer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: port search --maintainer[s]

Jan Stary
On Mar 31 02:07:15, [hidden email] wrote:

> On 2017-03-30 23:44, Jan Stary wrote:
> > On Mar 30 21:06:59, [hidden email] wrote:
> >> On 03/30/2017 06:18 PM, Jan Stary wrote:
> >>> This is 2.4.99 from git running on 10.6.8.
> >>> The 'port search' recognizes '--maintainer' and '--maintainers',
> >>> but the guide says '--maintainer' and '--maintainer'
> >>> while port-search.1 only says '--maintainer'.
> >>> Attached please find a diff for each.
> >>
> >> Note that all long options can be shortened as long as they are unique, so you
> >> could even use 'port search --maint foobar'.
> >
> > $ port search --maint mandoc
> > Error: "port search --maint" is ambiguous:
> >   port search --maintainer
> >   port search --maintainers
>
> Sorry, that's what happens when I do not test my examples...
>
> >> Maybe we want to simplify the code
> >> and leave out the explicit singular forms (although we cannot do that for
> >> "categories")?
> >
> > I don't understand why there is more then one at all.
>
> In natural language you would use either singular or plural, depending
> on the way it is used in a query. The port command just tries to be as
> convenient as possible.

But it's the other way now: if e.g. '--maintainers' was be the only one,
with unique shortenings working, you would also have '--maintaniner'
and '--maintain'. With both --maintainer and --maintainers recognized
as separated --options, it has to be one of the two, literaly,
because everything else is ambiquous. So recognizign only --maintainers
would actually be more convenient.

I suggest we only keep --maintainers and --variants.

With --categories, we don't have --category as a shortening,
but having --category makes --cat ambiguous, as above ...

        Jan

Loading...