-
Notifications
You must be signed in to change notification settings - Fork 20
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
@Version usage on top-level Cli? #57
Comments
What you are trying to do won't just work at the moment though it is definitely something I would like to do in the future. Annotations like Ideally we should also allow them on All The best way to do this currently would be to create a I will probably aim to have something built in in the future but I can't give you a time frame on that. |
Hi Rob, Thanks for the response. That makes sense...
I think a Having these on the top-level |
Agreed, this probably also relates to #53 which covers special handling for options like |
Yes although any and all option definitions within a class hierarchy will be discovered. So personally I usually define a abstract class with all my common options and there have all my other commands extend from that. |
Using help section annotations on Still need to incorporate use of help sections in CLI help |
Help sections defined at the @cli level are now incorporated into the output of GlobalUsageGenerator implementations (CLI, Man, Markdown) Includes unit tests for this
Help sections added at the |
Here's example output with latest
|
Hi,
I'd like to use the @Version annotation, but it seems to assume it's on a command object?
E.g. I have a Cli setup like:
I am admittedly source a MF sources (see my other ticket), but I was expecting this to blow up, and then I'd poke around at gradle to make a properties file instead.
But instead it looks like the
@Version
annotation here isn't getting found at all.I was thinking maybe I should make a subclass of the airline Help.class, and add my
@Version
there? ...well, no, that didn't work.Basically what I'd like is for when users run:
mirror
with no args, ormirror -v
That they see the version information.
Right now the output is just:
Is what I'm looking for already doable? Or something that's easy to support?
The text was updated successfully, but these errors were encountered: