-
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
[Ideas] Custom ArgGroup Validation/Rules #1411
Comments
The ArgGroup implementation is pretty complex and I am fairly happy with what it can do now, not planning to enhance this area in the near future. I am not sure, can you achieve your requirements, using the current version of picocli, with some workaround? |
I'm not sure if you get me correctly, but the idea is not to allow more complex rules but instead to make possible to do your own complex rules manually (so hoping to avoid to make ArgGroup more complex). This already almost doable but some details can not be done (or done "properly")
In by default @|option = Style.fg_yellow and, @|optionParams = Style.italic. |
Maybe I'm wrong but for now I didn't find a good way to use
ArgGroup
to make complex rules about options combination.This is quickly verbose and/or we face some corner case issue. (see #1409)
So the idea would be to be able to group some options together in a
ArgGroup
for which validation is done manually. (see #1410)But validation is not enough, you also need a custom synopsis as the default one will maybe no respect the rule you implement in your custom validation.
If I get it correctly, currently this is possible to propose a custom synopsis but only at
Command
level.But I have some simple option where I would like to keep default display I just want to customize the
ArgGroup
one and see it added in the Command one.(Not direclty linked maybe it need a dedicated issue)
In the
ArgGroup
heading I sometime want to display the ArgGroup synopsis and currently it is needed to maintain it manually maybe it could make sense to have a kind of marker like ${SYNOPSIS}.Here some example of an ArgGroup help usage (not the complete help usage) where I want to display the ArgGroup synopsis:
The text was updated successfully, but these errors were encountered: