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

Allow adding multiple groups from single Arg #426

Closed
3 tasks
kbknapp opened this issue Feb 15, 2016 · 0 comments
Closed
3 tasks

Allow adding multiple groups from single Arg #426

kbknapp opened this issue Feb 15, 2016 · 0 comments
Labels
C-enhancement Category: Raise on the bar on expectations E-medium Call for participation: Experience needed to fix: Medium / intermediate

Comments

@kbknapp
Copy link
Member

kbknapp commented Feb 15, 2016

Arg::with_name("arg")
    .groups(&["grp1", "grp2"])

I'm willing to mentor anyone who wants to take a stab at this. Things that probably need to happen:

  • Follow Arg::requires_all style method (or any other _all type method
  • Change Arg.group from Option<&'a str> to Option<Vec<&'a str>>
  • Change the relevant code in src/app/parser.rs to accept multiple groups instead of just the one.
@kbknapp kbknapp added C-enhancement Category: Raise on the bar on expectations P4: nice to have E-medium Call for participation: Experience needed to fix: Medium / intermediate labels Feb 15, 2016
homu added a commit that referenced this issue Jun 24, 2016
imp(ArgGroup): Add multiple ArgGroups per Arg

Add the function `Arg.groups` that can take a `Vec<&'a str>` to add the `Arg` to multiple `ArgGroup`'s at once.

ex:
```rust
Arg::with_name("arg")
    .groups(&["grp1", "grp2"])
```

Closes #426
@homu homu closed this as completed in #542 Jun 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Raise on the bar on expectations E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

1 participant