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: Clarify the default state of an Arg/field #5887

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

epage
Copy link
Member

@epage epage commented Jan 20, 2025

Inspired by https://www.reddit.com/r/rust/comments/1i5np88/clap_documentation_is_too_confusing_for_me/m87mutm/

I always use derive, and I mostly use the reference. From manual
experimentation I’ve had to develop the mental model that short
implicitly is what makes an argument non-positional, and if I want an
argument to be positional then it will be by default unless I specify
short. When I search for the word “positional” in the reference, there
are no results. When I search for it in the tutorial, there is one
result that says something I can do with an argument that i’ve made
positional, but there’s no indication for how to make the argument
positional in the first place. The reference documentation on short
doesn’t mention anything about the fact that that’s what determines
whether an argument is positional, even when I click through to the
builder documentation on Arg::short.

Inspired by https://www.reddit.com/r/rust/comments/1i5np88/clap_documentation_is_too_confusing_for_me/m87mutm/

> > I always use derive, and I mostly use the reference. From manual
> experimentation I’ve had to develop the mental model that short
> implicitly is what makes an argument non-positional, and if I want an
> argument to be positional then it will be by default unless I specify
> short. When I search for the word “positional” in the reference, there
> are no results. When I search for it in the tutorial, there is one
> result that says something I can do with an argument that i’ve made
> positional, but there’s no indication for how to make the argument
> positional in the first place. The reference documentation on short
> doesn’t mention anything about the fact that that’s what determines
> whether an argument is positional, even when I click through to the
> builder documentation on Arg::short.
@epage epage merged commit e01e2b9 into clap-rs:master Jan 20, 2025
25 checks passed
@epage epage deleted the positional branch January 20, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant