Skip to content
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

Document aliases parameter for @Command attribute #492

Closed
marinier opened this issue Sep 21, 2018 · 5 comments
Closed

Document aliases parameter for @Command attribute #492

marinier opened this issue Sep 21, 2018 · 5 comments
Milestone

Comments

@marinier
Copy link
Contributor

The aliases parameter of the @Command attribute doesn't appear to be documented at https://picocli.info/. (Perhaps another thing to consider is changing name to names, like @Option, and dropping aliases. The increased consistency may aid in discoverability of this feature.)

@remkop
Copy link
Owner

remkop commented Sep 21, 2018

Interesting idea about using @Command(names = { ... }). In the context of commands, the term "alias" is fairly common, so I did not think of using names. I'll think about this some more.

You're right about the lack of documentation. Do you think you will be able to provide a pull request to improve the doc?

@marinier
Copy link
Contributor Author

I'm taking a look at the documentation to see how to best work this in. There doesn't seem to be a great place for it at the moment -- there's no explicit documentation on the @Command attribute, it's more mentioned in passing and shows up in lots of examples.

So I can imagine a few approaches here:

  • Add a new section on the @Command attribute, probably a subsection under the Subcommands section?
  • Mention it in passing; e.g., in section 13.2 where it says that @Commands must have a name. As this is related, it could fit there ok.
  • Include it in some examples that already use @Command without really explaining it.

Clearly a dedicated section would be the greatest value, but also the most work, whereas one of the other approaches could be done immediately. Thoughts?

@remkop
Copy link
Owner

remkop commented Sep 22, 2018

Away from pc now, but the Subcommands section seems like a good fit.

@marinier
Copy link
Contributor Author

I finally decided on a brief new subsection for aliases; pull request submitted. I realized that trying to more completely document @Command was unnecessary, given that the javadocs essentially do that.

@remkop
Copy link
Owner

remkop commented Sep 23, 2018

Thank you for the PR! I merged it.

I’ll close this ticket after I get a chance to update the RELEASE-NOTES.md.

@remkop remkop added this to the 3.6.1 milestone Sep 23, 2018
@remkop remkop closed this as completed in a02b213 Sep 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants