`-h` of Subcommand does not print full information
See original GitHub issueVersion: 0.3.0
I have command:
class Test: Subcommand("test") {
val input by argument(ArgType.String, "This text will be written")
override fun execute() { }
}
If I run with the arguments test -h, it prints very little information like:
Usage: android-dev-tools test options_list
However, if I made a mistake, then it shows full documentation as error:
Usage: android-dev-tools test options_list
Arguments:
This text will be written { String }
Options:
--help, -h -> Usage info
at kotlinx.cli.ArgParser.printError(ArgParser.kt:348)
at kotlinx.cli.ArgParser.parse(ArgParser.kt:635)
at kotlinx.cli.ArgParser.parse(ArgParser.kt:640)
at kotlinx.cli.ArgParser.parse(ArgParser.kt:521)
at com.vinted.devtools.android.AppKt.main(App.kt:14)
Reproduction: problem.zip
An easiest way to reproduce:
./gradlew run --args="test -h" // I am expecting full help here
./gradlew run --args="test" // works as expected
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
CommandLine.usage on subcommand does not properly ...
CommandLine.usage on subcommand does not properly display command ... In that case, it doesn't print any information about the subcommands.
Read more >Subcommands - IBM
Note: Not all printers can print in all directions. See your printer documentation for more information. SUPPRESSION. Read syntax diagram Skip visual syntax ......
Read more >App in clap - Rust - Docs.rs
Used to create a representation of a command line program and all possible command line arguments. Application settings are set using the “builder...
Read more >Tutorial: Get started with System.CommandLine
Learn how to use the System.CommandLine library for command-line apps.
Read more >Command-Line Usage of uap — uap 0.1.1 documentation
Therefore, uap provides help information on the command-line: $ uap -h usage: ... Subcommands¶. Here an overview of all the available subcommands are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Fixing this problem PR is already waiting review.
0.3.1version with fix was published