Skip to content
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

Move Positional Arguments into its own section in generated manpages #3580

Closed
wants to merge 1 commit into from
Closed

Move Positional Arguments into its own section in generated manpages #3580

wants to merge 1 commit into from

Conversation

ducaale
Copy link
Contributor

@ducaale ducaale commented Mar 26, 2022

This PR also:

  • Adds Man::render_positionals_section() for rendering docs for positional arguments
  • Renders a header for each positional argument
  • Attempts to use Arg::value_name before falling back to Arg::id for the header names

Resolves #3579

@epage
Copy link
Member

epage commented Mar 26, 2022

Attempts to use Arg::value_name before falling back to Arg::id for the header names

Could you split this out into its own PR?

clap_mangen/src/lib.rs Outdated Show resolved Hide resolved
Comment on lines +193 to +194
/// Render the POSITIONAL ARGUMENTS section into the writer.
pub fn render_positionals_section(&self, w: &mut dyn Write) -> Result<(), std::io::Error> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think more discussion is needed on #3579 before we merge this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate section for Positional Arguments in generated manpages
2 participants