You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
epage
changed the title
Missing trailing newline on help with disabled flag and subcommand
Missing trailing newline on error with disabled flag and subcommand
Dec 13, 2021
epage
changed the title
Missing trailing newline on error with disabled flag and subcommand
Missing trailing newline on error with disabled help flag and subcommand
Dec 13, 2021
The problem is in src/parser/error.rs. Instead of the code focusing only on leading or trailing newlines for each section, it mixes them. usage and try_help use leading newlines buttry_help also uses a trailing newline, if its used.
As a short term solution, we could add an else clause in try_help that adds a trailing newline. Ideally, we'd better organize this so it was more predictable of what happens.
epage
added a commit
to epage/clap
that referenced
this issue
Dec 13, 2021
Please complete the following tasks
Rust Version
1.54.0
Clap Version
master
Minimal reproducible code
Steps to reproduce the bug with the above code
cargo run -- help
Actual Behaviour
The help message does not contain a trailing newline
Expected Behaviour
The help message should contain a trailing newline
Additional Context
https://github.com/clap-rs/clap/pull/2786/files#r715734272
Debug Output
No response
The text was updated successfully, but these errors were encountered: