Skip to content

Auto-generate manpage, help docs, etc. #552

Closed
@joshtriplett

Description

@joshtriplett

Maintainer notes:


I'd love to have support to generate a manpage. This would use a mechanism and infrastructure similar to #376. Additional functions to override or augment portions of the generated manpage could come later, but I think with relatively few additions this could become an incredibly useful mechanism.

  • The manpage title should default to the bin_name value.
  • The section should default to 1.
  • The NAME section should default to bin_name \- about, where about is the string set by .about.
  • The SYNOPSIS section should contain the usage strings for the command and every subcommand.
  • The DESCRIPTION section would need some new paragraph-style information provided (also usable as a more structured .before_help).
  • The "OPTIONS" section should document the flags and args for the top-level command.
  • If the command has subcommands, a "SUBCOMMANDS" section should document each subcommand in a sub-section.
  • The AUTHORS section should contain the author information, if provided.
  • The SEE ALSO section would need some new mechanism to populate it.

I'd be happy to help with manpage markup, once I see the details of the mechanism used in #376.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-helpArea: documentation, including docs.rs, readme, examples, etc...C-enhancementCategory: Raise on the bar on expectationsS-blockedStatus: Blocked on something else such as an RFC or other implementation work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions