[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: macOS Terminal man page URL format
From: |
G. Branden Robinson |
Subject: |
Re: macOS Terminal man page URL format |
Date: |
Mon, 6 Feb 2023 13:10:05 -0600 |
Hi John,
At 2023-02-06T18:53:10+1100, John Gardner wrote:
> So the exact URL format *does* need to be configurable,
Please review, apply, and test the attached patch.
> preferably with a separate string for apropos(1) links, if supported
> (which would logically default to the `an*MR-scheme` string, or
> whatever we decide to name it.
apropos(1) is not in groff's department. If you want hyperlinked
apropos output (a good idea, by the way), man-db author and maintainer
Colin Watson is the person to talk to.
That said, I have proposed lightening his plate (except for what he'll
have to retain for portability, which is probably "everything") by
suggesting that groff's man(7) and mdoc(7) could be run in a mode such
that they would produce the "apropos line" themselves. In man-db, a
tool called "lexgrog(1)" has to do that, and it is fundamentally limited
by not being a 900-lb. full implementation of a *roff interpreter.
(Nevertheless it does an excellent job on well-behaved input.)
It baffles me that this hasn't been done before. Nothing but *roff
should be trying to interpret *roff, but people kept trying...
It _should_ be easy. Test one string or register, and if it's true,
divert the output, then wait to hit a `SH` call with an argument of
"NAME" or "Name", end the diversion, format normally, then when you hit
`SH` again, invoke `nx` to skip to the next input file.
(N.B., the diversion is never emitted. It is thrown away, just as Doug
McIlroy indirectly taught me with "divert(-1)" in m4.)
Maybe for some reason this _isn't_ easy and I'll be laughing out the
other side of my face. But its _seems_ plausible...
And of course the same could and should be done for mdoc(7), which
already performs tests its `SH` arguments far more than man(7) ever
dreamed of doing.
Regards,
Branden
macOS-man-grief.diff
Description: Text Data
signature.asc
Description: PGP signature
- Re: macOS Terminal man page URL format, (continued)
- Re: macOS Terminal man page URL format, G. Branden Robinson, 2023/02/13
- Re: macOS Terminal man page URL format, John Gardner, 2023/02/15
- Re: macOS Terminal man page URL format, G. Branden Robinson, 2023/02/15
- Re: macOS Terminal man page URL format, John Gardner, 2023/02/15
- Re: macOS Terminal man page URL format, G. Branden Robinson, 2023/02/15
- Re: macOS Terminal man page URL format, John Gardner, 2023/02/15
- Re: macOS Terminal man page URL format, G. Branden Robinson, 2023/02/16
- Re: macOS Terminal man page URL format,
G. Branden Robinson <=