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

Fix documentation for Command::after_long_help() #5491

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

pgerber
Copy link
Contributor

@pgerber pgerber commented May 13, 2024

Playground link showing that .afer_long_help() isn't shown with -h.

@epage
Copy link
Member

epage commented May 14, 2024

As the documentation and the implementation diverge, an important thing to do is to determine which is "correct". I would generally recommend starting with an issue first, rather than a PR. However, I'm going to try to do that analysis here.

Current behavior

location short long notes
before help before_help before_long_help or before_help added in #2008, changed in #2174
command about about long_about or about changed in #1612
arg help help or long_help long_help or help
subcommand about about or long_about about or long_about changed in #2558
after help after_help after_long_help or after_help added in #2008, changed in #2174

Docs mismatch

  • before_long_help
  • long_about
  • after_long_help

The inconsistency in "command about"'s short and "subcommand about" is suspicious

Overall, this seems intentional enough with docs having been missed or changed as a result of a misunderstanding. I'm willing to go forward with this

long_help() does not propagate the message to help(). Nor do the
others.
@epage epage merged commit d408a82 into clap-rs:master May 20, 2024
22 checks passed
@epage
Copy link
Member

epage commented May 20, 2024

Thanks!

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.

None yet

2 participants