-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
App::with_defaults
pulls clap's author and version
#638
Comments
Interesting, I hadn't thought about that happenig. Thanks for reporting! |
This still happens in 2.11.2, maybe that commit was meant to close #643 instead? |
@clux yes, that was a mistake. Thanks! |
From @RoPP
extern crate clap;
use clap::App;
fn main() {
App::with_defaults("plop").get_matches();
} cargo run -- --help
Running `target/debug/plop --help`
Plop 2.14.0 <-------------------
Kevin K. <[email protected]> <--------
USAGE:
plop
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
|
After a couple of iterations I've approached this from a different angle: what if instead the above #[macro_use]
extern crate clap;
use clap::App;
fn main() {
defaulted_app!("plop").get_matches();
} Name to be improved, of course. |
@nabijaczleweli perhaps. I'm not against that, but also don't want to confuse people with the At this point, I'm also not really against simply deprecating |
|
Agreed. |
…te, r=kbknapp Deprecate App::with_defaults() Closes #638
…te, r=kbknapp Deprecate App::with_defaults() Closes #638
Darn it, I guess if it doesn't work it doesn't work. Can I make a ticket to discuss a redesign for v3? |
Yeah its deprecated as basically unfixable at this time. :( On Oct 28, 2016 7:26 AM, "Roman A. Taycher" [email protected]
|
It's because it pulls the info from the compilation of the clap-rs crate right? And a macro like @nabijaczleweli proposed would work, right? I was wondering if I could start a ticket to discuss re-design or if there's another place I could put it(forum?)? I had some other ideas, like possibly putting CARGO_PKG_DESCRIPTION in about. |
@rtaycher I'm all for opening an issue/PR which either fixes this, or discusses new ways to accomplish it. There are just other issues which are are a higher priority for myself right now, but if you'd like to open the discussion and try out some fixes I'm all for it 👍 |
Using the new
App:with_defaults
displays clap's author and version number.This is with clap version 2.11.0
The text was updated successfully, but these errors were encountered: