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

#[command] docs are missing #5125

Closed
2 tasks done
nixpulvis opened this issue Sep 14, 2023 · 5 comments
Closed
2 tasks done

#[command] docs are missing #5125

nixpulvis opened this issue Sep 14, 2023 · 5 comments
Labels
C-enhancement Category: Raise on the bar on expectations

Comments

@nixpulvis
Copy link

Please complete the following tasks

Clap Version

4

Describe your use case

I'm trying to figure out how to use #[command] on a derived Parser. Docs for #[arg] seem to exist, so I was expecting these as well. It's a shame there's probably not a surefire way to ensure these are exhaustive, since they are macro attributes, but still beats reading through all the examples for what #[command] takes.

Describe the solution you'd like

Document #[command].

Alternatives, if applicable

No response

Additional Context

No response

@nixpulvis nixpulvis added the C-enhancement Category: Raise on the bar on expectations label Sep 14, 2023
@nixpulvis
Copy link
Author

I was just expecting it since there are docs at the top level under arg. Maybe just put a link in the command macro docs so people like me don't get lost?

@epage
Copy link
Member

epage commented Sep 14, 2023

There are not top-level docs for #[arg()] but for arg! which is a macro to use the builder API by example. Similarly, there are top-level docs for command! which is also for the builder API.

@nixpulvis
Copy link
Author

Oh, that makes sense. Sorry for the confusion. Macro docs in Rust still confuse me.

@epage
Copy link
Member

epage commented Sep 14, 2023

rustdoc has no support for proc macro attributes which makes things more difficult in general. The above links are my experimentation in making up for that problem.

@epage epage closed this as not planned Won't fix, can't repro, duplicate, stale Sep 14, 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