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

Possible Value help #3503

Merged
merged 8 commits into from
Mar 2, 2022
Merged

Conversation

ModProg
Copy link
Contributor

@ModProg ModProg commented Feb 23, 2022

  • unstable-v4 feature
  • Show help for possible values

#3312

@ModProg ModProg force-pushed the possible_value_help_in_help branch 2 times, most recently from 105d506 to 336cfb1 Compare February 23, 2022 09:22
@ModProg ModProg force-pushed the possible_value_help_in_help branch from 336cfb1 to 9839cf8 Compare February 23, 2022 09:23
@ModProg
Copy link
Contributor Author

ModProg commented Feb 23, 2022

I added the test in a way where both the behaviour with unstable-v4 and without are testet.

tests/builder/help.rs Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Makefile Show resolved Hide resolved
src/output/help.rs Outdated Show resolved Hide resolved
tests/builder/help.rs Outdated Show resolved Hide resolved
tests/builder/help.rs Outdated Show resolved Hide resolved
@epage
Copy link
Member

epage commented Feb 23, 2022

Thanks for moving this forward!

tests/builder/help.rs Outdated Show resolved Hide resolved
tests/builder/help.rs Outdated Show resolved Hide resolved
@ModProg ModProg force-pushed the possible_value_help_in_help branch from 33585a3 to 592d981 Compare March 1, 2022 12:39
@ModProg
Copy link
Contributor Author

ModProg commented Mar 1, 2022

Should we maybe add a rustfmt.toml to the project? That way, contributors with global rustfmt configurations would not need to worry about that before making a commit?

Could be easily generated with rustfmt --print-config default > rustfmt.toml. That way we could also check if it is still default in CI.

@epage
Copy link
Member

epage commented Mar 1, 2022

That way, contributors with global rustfmt configurations would not need to worry about that before making a commit?

Maybe its just me but rather than every project having to have a rustfmt.toml, it seems like it'd be better for people not to use a global rustfmt. Maybe there is something I'm missing about the workflow but it seems like formatting should be tied to the repo and not the user.

README.md Outdated Show resolved Hide resolved
src/build/possible_value.rs Outdated Show resolved Hide resolved
src/output/help.rs Outdated Show resolved Hide resolved
@ModProg
Copy link
Contributor Author

ModProg commented Mar 1, 2022

Maybe its just me but rather than every project having to have a rustfmt.toml, it seems like it'd be better for people not to use a global rustfmt. Maybe there is something I'm missing about the workflow but it seems like formatting should be tied to the repo and not the user.

Probably depends on how many private projects someone has.

@epage epage merged commit 33949ce into clap-rs:master Mar 2, 2022
epage added a commit to epage/clap that referenced this pull request May 6, 2022
In a refactor for clap-rs#3503, one of the checks for `is_hide_set` got flipped
and we are completing hidden `PossibleValue`s rather than visible.

Fixes clap-rs#3697
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.

2 participants