-
Notifications
You must be signed in to change notification settings - Fork 418
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
Global parser configuration if using Runnable #650
Comments
|
…te` and `tryExecute` methods: configurable convenience methods with improved exit code support. * The new `execute` and `tryExecute` methods are similar to the `run`, `call` and `invoke` methods, but are not static, so they allow parser configuration. * In addition, these methods, in combination with the new `IExitCodeGenerator` and `IExitCodeExceptionMapper` interfaces, offer clean exit code support. * Finally, the `tryExecute` method rethrows any exception thrown from the Runnable, Callable or Method, while `execute` is guaranteed to never throw an exception. * Many variants of the previous `run`, `call` and `invoke` convenience methods are now deprecated in favor of the new `execute` methods. * Many methods on `AbstractHandler` are now deprecated. Still TODO: tests and documentation.
An initial version just landed in master. Please check it out if you have a chance. |
picocli-4.0-alpha-3 has been released with a new execute API that facilitates configuration. This is the last alpha! Please take a look and provide feedback if you have a chance. |
Sry for not responding, the new features are awesome. Especially, the better return code support and exit code help. I'll have a closer look this week. Is there a estimated release date for 4.0 (of course w/o guarantees). |
It's a bit hard to tell, depends on how fast I can go through the backlog for 4.0-beta-1 and 4.0. I may drop some of the items that are currently on the 4.0 TODO list. I'd guess roughly 1-2 months to 4.0-GA. |
Upgraded my project to the use "execute" commandline and it works, but I get some warnings in the beginning. Are you aware of them?
For reference:
Thank you for the timeline. |
I hadn’t noticed these warnings yet because I work mostly on Java 8. |
@gitfineon Would you mind creating a new ticket for this? Please mention which version of Java you are using. |
I tried to apply parser configuration e.g. disallow POSIX Clustered Short Option, but I don't know where to place the
CommandLine.setPosixClusteredShortOptionsAllowed(false)
.I want to keep it simple and straight forward as possible so I started with your README Example (Runnable) and added three boolean switches ... and now I want to achieve that the clustered version of them will result in an "unknown option" + usage (preferred without showing the options clustered)
I search in the documentation but didn't found an explanation.
I would prefer to have this parser configuration set globally for the whole application, but individually for each command would be okay as well.
The text was updated successfully, but these errors were encountered: