Page MenuHomeFreeBSD

pw.conf.5: Make the .Nd more informative
AcceptedPublic

Authored by temcbun_gmail.com on Sat, Jul 18, 9:37 PM.
Referenced Files
F163497911: D58329.diff
Thu, Jul 23, 8:09 PM
Unknown Object (File)
Wed, Jul 22, 4:10 AM
Unknown Object (File)
Wed, Jul 22, 3:24 AM
Unknown Object (File)
Tue, Jul 21, 8:09 AM
Unknown Object (File)
Sat, Jul 18, 10:35 PM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

ziaee requested changes to this revision.Mon, Jul 20, 10:38 PM
ziaee added inline comments.
usr.sbin/pw/pw.conf.5
30–31
  1. Document descriptions should not have crossreferences especially, but really any child macros. Manpage compiler upstream has said (quite strongly and hilariously actually) it's wrong.
  1. Multiline Nd is not portable, our compiler does work with it but, but it's kinda never appropriate because Nd is "one line about what it does".
  1. Basic manual search includes the Nm and Nd. So, self referential descriptions are not just bad for eloquence but also mechanically wasteful and useless.

How's this? It follows more closely the description set by pw(8) so there will be a narrative consistency and it will show up in more of the same searches like "group".

This revision now requires changes to proceed.Mon, Jul 20, 10:38 PM

Thank you for the review!

Document descriptions should not have crossreferences especially, but really any child macros.

Oh, yeah, I found a warning about it in mdoc(7) (though it says that child macros are technically not wrong):

The Nd macro technically accepts child macros and terminates with a subsequent
Sh invocation.  Do not assume this behaviour: some whatis(1) database generators
are not smart enough to parse more than the line arguments and will display
macros verbatim.

Manpage compiler upstream has said (quite strongly and hilariously actually) it's wrong.

But where exactly does it say this? I tried to lint the page with mandoc(1), but I see no errors or warnings regarding .Nd:

$ mandoc -T lint usr.sbin/pw/pw.conf.5 
mandoc: usr.sbin/pw/pw.conf.5:70:2: STYLE: useless macro: Tn
mandoc: usr.sbin/pw/pw.conf.5:162:2: STYLE: useless macro: Tn

How's this? It follows more closely the description set by pw(8) so there will be a narrative consistency and it will show up in more of the same searches like "group".

Your variant looks good to me, I will now update the revision.

temcbun_gmail.com retitled this revision from pw.conf.5: .Xr pw(8) in the title description to pw.conf.5: Make the .Nd more informative.
temcbun_gmail.com edited the summary of this revision. (Show Details)

Get rid of .Xr in .Nd and make the .Nd itself more informative.

Document descriptions should not have crossreferences especially, but really any child macros.
Manpage compiler upstream has said (quite strongly and hilariously actually) it's wrong.

But where exactly does it say this?

https://marc.info/?l=mandoc-tech&m=172624249227999&w=2

This revision is now accepted and ready to land.Wed, Jul 22, 9:17 PM