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

[RFE] option groups #35

Open
ares opened this issue Oct 3, 2013 · 3 comments
Open

[RFE] option groups #35

ares opened this issue Oct 3, 2013 · 3 comments
Labels

Comments

@ares
Copy link
Contributor

ares commented Oct 3, 2013

What do you think of adding groups to options so when you display help you can divide them? Especially useful when you have more than 15 options I think.

@mdub
Copy link
Owner

mdub commented Oct 4, 2013

Yeah, I think option groups would be a great addition.

I imagine the DSL might look something like:

option_group "Authentication" do

  option "--access-key", "KEY", "AWS access key"
  option "--secret-key", "KEY", "AWS secret key"

end

option_group "Output" do

  option ["-f", "--format"], "FORMAT", "output format", :default => "json"
  option ["--verbose"], :flag, "be chatty"

end

@ares
Copy link
Contributor Author

ares commented Oct 7, 2013

yup, DSL look good, also it would be nice to have some API for getting groups of option definitions or even get all options of a particular group

@kke
Copy link
Contributor

kke commented Mar 5, 2019

This would be excellent for "global options" that are inherited to subcommands when subclassing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants