When the root command has a required argument, it is not output to the subcommand help. #3606
Closed
2 tasks done
Labels
Milestone
Please complete the following tasks
Rust Version
rustc 1.59.0 (9d1b2106e 2022-02-23)
Clap Version
clap = { version = "3.1.7", features = ["derive"] }
Minimal reproducible code
Steps to reproduce the bug with the above code
Execute
cargo run help test
.Actual Behaviour
The following is output.
Expected Behaviour
Additional Context
If you try to execute
cargo run test
, it requires the NAME argument as follows.Execute
cargo run test --help
produces the expected output.As an additional preference, it would be easier to understand if it could be executed in a sequence such as
excmd.exe test <NAME>
.Also, it would be easier to understand if the subcommand takes over only when specified as follows.
Debug Output
Execute
cargo run help test
.The text was updated successfully, but these errors were encountered: