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

Docs incorrect about ArgGroups in YAML #601

Closed
laishulu opened this issue Jul 25, 2016 · 3 comments
Closed

Docs incorrect about ArgGroups in YAML #601

laishulu opened this issue Jul 25, 2016 · 3 comments
Labels
A-docs Area: documentation, including docs.rs, readme, examples, etc...

Comments

@laishulu
Copy link

with the following yaml file, when I invoke myapp without any arguments, it just passes.
But according to the spec, at least one of base and delta should be presented.
Also, I don't find anything about the arg group when I invoke myapp help

name: myapp
version: 0.1
about: myapp
global_settings:
    - ColoredHelp
args:
    - base:
        long: base
        value_name: BASE
        help: Base
        takes_value: true
        display_order: 2
    - delta:
        long: delta
        value_name: DELTA
        help: delta
        takes_value: true
        display_order: 3
arg_groups:
    - test:
        args:
            - base
            - delta
        required: true
@laishulu
Copy link
Author

Oh, I found if use goups instead of arg_groups, then it works.
but the document and examples (https://github.com/kbknapp/clap-rs/blob/master/examples/17_yaml.yml#L87) should be updated.

@kbknapp
Copy link
Member

kbknapp commented Jul 26, 2016

Ah thank you for pointing this out! This was a change between v1 to v2.

@kbknapp kbknapp added P2: need to have A-docs Area: documentation, including docs.rs, readme, examples, etc... labels Jul 26, 2016
@kbknapp kbknapp changed the title arg_groups in yml file does not work Docs incorrect about ArgGroups in YAML Jul 26, 2016
kbknapp added a commit that referenced this issue Jul 26, 2016
@kbknapp
Copy link
Member

kbknapp commented Jul 26, 2016

#603 fixes this

homu added a commit that referenced this issue Jul 26, 2016
docs(YAML): fixes example 17's incorrect reference to arg_groups inst…

…ead of groups

Closes #601
homu added a commit that referenced this issue Jul 26, 2016
docs(YAML): fixes example 17's incorrect reference to arg_groups inst…

…ead of groups

Closes #601
@homu homu closed this as completed in #603 Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation, including docs.rs, readme, examples, etc...
Projects
None yet
Development

No branches or pull requests

2 participants