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

Update documentation for arg attribute #5090

Closed
2 tasks done
MiniaczQ opened this issue Aug 26, 2023 · 1 comment
Closed
2 tasks done

Update documentation for arg attribute #5090

MiniaczQ opened this issue Aug 26, 2023 · 1 comment
Labels
C-enhancement Category: Raise on the bar on expectations

Comments

@MiniaczQ
Copy link

Please complete the following tasks

Clap Version

4.4.0

Describe your use case

I've been porting a CLI application from clap ~2, to 4.4.0 with the goal being struct based arguments through derives.
One of the tests showed the change in behavior of --flag val1 val2, currently known as num_args.
It was impossible to find an example usage of this for derive-style in examples and docs.

I finally managed to find it through a lucky comment in this discussion, but knowing this and browsing the repository again, it revealed that this parameter is only mentioned a few times.

Describe the solution you'd like

Ideally there'd be docs and examples for every parameter arg (possibly other) macro accepts, so at least creating issues to add those examples would help a bit.

Alternatives, if applicable

No response

Additional Context

I'm not well versed in clap, this has been my first usage of it in a project.

@MiniaczQ MiniaczQ added the C-enhancement Category: Raise on the bar on expectations label Aug 26, 2023
@epage epage changed the title Update documentation for arg macro Update documentation for arg attribute Aug 27, 2023
@epage
Copy link
Member

epage commented Aug 27, 2023

At this time we intentionally document how to use builder methods within the derive and only explicitly document attributes that have special meaning outside of the derive API.

#4090 is where we are discussing how this could be better communicated or improved. Closing in favor of that.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Aug 27, 2023
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
Projects
None yet
Development

No branches or pull requests

2 participants