-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which sections should a man page have? #1
Comments
The semantic-markup mdoc(7) format lists the following sections:
groff_mdoc(7), under the heading "A MANUAL PAGE TEMPLATE" includes an even longer list of suggested header names:
|
I've compiled the sections listed above into the table below, which lists those sections
*As discussed in #7, the options implementation does not yet handle optional arguments correctly. Based on the above, I plan to open issues on the Version and Examples sections with proposed APIs soon and prioritize those as the next two sections to implement. But please let me know if anyone feels other sections should be a higher priority. |
"Synopsis" is actually not quite implemented because you are supposed to, in systems that take man pages seriously (i.e. old school Unix and current BSD), give a big overview of what you do. So instead of "prog [options] files...", you write "prog [-AavV46xy] [-e expr] files...". Folks these days don't see it because (sigh) everyone uses a GNU-influenced system, and GNU has always treated I mean, the whole "structured" bit in the crate description can be heavily debated once you see what mdoc(7) (of 1977, 4.4BSD!) has brought to this barren language originally dominated by man(7). mdoc(7) really shines once you run The OpenBSD mandoc people have produced long forms of the mdoc(7) documentation at https://mandoc.bsd.lv/mdoc/. There are whole pages on Synopsis and Section order – an extremely well-written and useful resource. And it's all written in mdoc(7) just to show what the language can do. Generating mdoc is tough if you are starting from a "semantics-less" format like Markdown or Asciidoc. It is possible in rust-man with the expanded access to flags, but the restructuring needed will take a lot of work: a LOT MORE macros are called, many of them inline requiring It would be a cool feat for the crab crowd though, seeing it might just be the first mdoc(7) code generator, ever. Might deserve a rust rave or something if you get it done. |
I'm thinking almost all sections should be optional, but we want to somewhat restrict which sections are possible. Which sections should we have?
From what I've seen, we should probably support the following sections:
Required
This should probably be part of the
::new()
constructor?Optional
-h
in CLIs~/.ifconfig
)The text was updated successfully, but these errors were encountered: