You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it's generally best to make cmdline parsing as simple and short as possible.
In that spirit I'd like to propose adding a way to initialize version/authors
implicitly since this would add make it more difficult to build an app without cargo
(although you could just define the 2 env variable manually) and since
App::new doesn't depend on it currently I thought people might be opposed to
changing it.
Instead how about adding a new method App::new_with_defaults?
The text was updated successfully, but these errors were encountered:
I think is a fine idea. I'd like to hear a few more opinions on the matter before adding it, primarily around the naming. I think new_with_defaults is kind of long. Maybe just App::with_defaults(name)?
… crate_version! macros
One can now use
```rust
let a = App::with_defaults("My Program");
// same as
let a2 = App::new("My Program")
.version(crate_version!())
.author(crate_authors!());
```
Closes#600
I think it's generally best to make cmdline parsing as simple and short as possible.
In that spirit I'd like to propose adding a way to initialize version/authors
implicitly since this would add make it more difficult to build an app without cargo
(although you could just define the 2 env variable manually) and since
App::new doesn't depend on it currently I thought people might be opposed to
changing it.
Instead how about adding a new method App::new_with_defaults?
The text was updated successfully, but these errors were encountered: