Hacker News new | ask | show | jobs
by joshklein 2341 days ago
> they serve two different purposes

I agree, but I'm also painfully aware of man page incompleteness every time I'm on a non-OpenBSD system. I'd be grateful to anyone who chipped away at proper tagging for any GNU software. One should be able to :t to jump to the reference for any flag.

1 comments

That's impossible by means of how they're written. GNU still cares about operating systems that don't bundle the mdoc macros with their troff processor and don't use mandoc (which is... exactly only AIX and HP-UX at this point), so they write all their text in man so that they render correctly everywhere.

For tagging, the formatting would need to be redone to be mdoc, which breaks both the OSes mentioned above and would be an immensely arduous task at this point. Probably not going to happen.

Note GNU and and the Linux man-pages project are mostly outliers; everyone else that lives in BSD/illumos land has long since moved on to mdoc since like the 80s. See also https://www.usenix.org/system/files/login/articles/141-dzons...

> That's impossible by means of how they're written. GNU still cares about operating systems that don't bundle the mdoc macros with their troff processor

Sudo supports such systems even though its manuals are written in mdoc.

The source tarball contains both the original mdoc manuals and man manuals, autogenerated by mandoc (https://mandoc.bsd.lv) which can convert mdoc to man—easy to do, since mdoc is a semantic format.

Then at build time one format or the other will be installed depending on how capable the system manpage formatter is.

Any project using mdoc pages could do the same thing. Projects using autotools could even copy Sudo’s autoconf macros for this.