--help does not show subcommand description if there are any other parameters present
Reproducer:
private val param = Options.text("param")
override def cliApp: CliApp[Any with ZIOAppArgs with Scope, Any, Any] =
CliApp.make(
"test",
"0.1.0",
HelpDoc.Span.text("Reproduce --help issue"),
command = Command("test", param).subcommands(
Command("a")
.subcommands(
Command("b")
)
.map { _ => () }
)
) { _ => ZIO.unit }
Expected behaviour: result for a --help and --param text a --help should be the same - help for a subcommand.
Actual result: --param text a --help shows root doc instead.
Correct result:
$ ./bin/test a --help
...
USAGE
$ test a b
COMMANDS
b
Incorrect result:
$ ./bin/test --param text a --help
...
USAGE
$ test --param text a b
OPTIONS
--param text
A user-defined piece of text.
COMMANDS
a
See minimal reproducer here: https://github.com/senia-psm/zio-cli-222
/bounty $100
💎 $100 bounty • ZIO
Steps to solve:
-
Start working: Comment
/attempt #222with your implementation plan -
Submit work: Create a pull request including
/claim #222in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
Thank you for contributing to zio/zio-cli!
Add a bounty • Share on socials
| Attempt | Started (GMT+0) | Solution |
|---|---|---|
| 🟢 @pablf | #295 |
@jdegoes @adamgfraser Please assign this to me.
@ithinkicancode Done!
💡 @pablf submitted a pull request that claims the bounty. You can visit your bounty board to reward.