-
Notifications
You must be signed in to change notification settings - Fork 152
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
Allow opting out of clap default features. #46
Conversation
Clap comes with some colorful default features, which are not always useful or wanted, so allow opting out of them.
Thanks for the contribution! I'm not a cargo feature wizard, thus I have a few questions:
|
Yup, this leaves the default unchanged (just checked with a fresh test-crate for good measure :). I added a note on how to disable the color-stuff in the README, was that where you meant? |
Mmm, thus, or you desactivate everything, or nothing? You can't desactivate color but activate suggestions? |
I can add features here like:
Then you can use But, do you think it's likely anyone would use that? |
That may be overkill. Let's do it simple first. |
README.md
Outdated
[dependencies] | ||
structopt = { version = "0.1.0", default-features = false } | ||
structopt-derive = "0.1.0" | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to disable all the clap
features (color, suggestions...), add [...]
I would prefer this doc to be in src/lib.rs than in README.md.
After that, I'll merge it.
Thanks!
Like this? |
Thanks! |
0.1.7 published |
test against rust 1.26.0
How do I enable them tho? I read its "on by default" but I don't see colors nor suggestions. [dependencies]
structopt = "0.3" |
Weird they should be on. Try
|
Nope, nothing. I don't want to spam anymore here, I'll open a separate issue, just last question: Was I supposed to turn on the features explicitly in rust code? Or including them in |
Clap comes with some colorful default features, which are not always useful or wanted, so allow opting out of them.