-
Notifications
You must be signed in to change notification settings - Fork 424
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
Clarification about repeatable subcommand #2133
Comments
Hi @sbernard31, I believe the user manual mentions this; it's not supported to "go up the hierarchy". So, this would be supported:
But once the parser is at the |
Thx for answer.
Maybe you refer to https://picocli.info/#_repeatable_subcommands_specification
(In my case this is not the parent but this is same level as the parent)
Yep but this doesn't really match my use case.
Does it exist an elegant way to change the parsing ? |
Maybe I'm wrong but current behavior lead to some strange surprising behavior where but from a user point of view, he just execute 2 "action" in 2 different order 🤔. Intuitively I understood that an "action" is a leaf in command graph (https://picocli.info/#_repeatable_subcommands_specification) |
About :
I tried to dig in the code to see if there is a way to change/customize/extend this behavior and unfortunately I didn't find anything. Could you confirm if I'm right ? 🙏 Hard blow for me because :
|
The parsing code for repeatable subcommands is not easily customizable I’m afraid. You may need to restructure your application somehow. One idea is to use more options and fewer sub-subcommands, but you are more familiar with your objectives. |
I can describe my use case : I need a way configure transport layer of my application :
(This is even more complicated than that but I hope this is enough to understand the issue) So for example I hoped I could do :
Using subcommand make easy:
|
I wanted to create something like :
I was expected I will be able to do call looking like :
But it failed with something like :
Unmatched argument at index 4: 'SB'
I would like to be sure it's not supported ?
The text was updated successfully, but these errors were encountered: