- Introduce smarter parsing of doc comments by @0ndorio
- Automatic naming of fields and subcommands by @0ndorio
- Fix minimal clap version by @TeXitoi
- Upgrade syn to 0.15 by @konstin
- 1.21.0 is the minimum required rustc version by @TeXitoi
- Fix a bug when using
flattenby @fbenkstein - Update syn, quote and proc_macro2 by @TeXitoi
- Fix a regression when there is multiple authors by @windwardly
- Add
StructOpt::from_iter_safe(), which returns anErrorinstead of killing the program when it fails to parse, or parses one of the short-circuiting flags. (#98 by @quodlibetor) - Allow users to enable
clapfeatures independently by @Kerollmops - Fix a bug when flattening an enum (#103 by @TeXitoi
- Add flattening, the insertion of options of another StructOpt struct into another (#92) by @birkenfeld
- Fail compilation when using
default_valueorrequiredwithOption(#88) by @Kerollmops
- Fail compilation when using
default_valueorrequiredwithbool(#80) by @TeXitoi - Fix compilation with
#[deny(warnings)]with the!type (rust-lang/rust#49039 (comment)) by @TeXitoi - Improve first example in the documentation (#82) by @TeXitoi
- Work around breakage when
proc-macro2's nightly feature is enabled. (#77 and proc-macro2#67) by @fitzgen
- Fix compilation with
# by @TeXitoi - Fix #76 by @TeXitoi
- Re-licensed to Apache-2.0/MIT by @CAD97
- An empty line in a doc comment will result in a double linefeed in the generated about/help call by @TeXitoi
- Fix a bug around enum tuple and the about message in the global help by @TeXitoi
- Fix #65 by @TeXitoi
Don't special case u64 by @SergioBenitez
If you are using a u64 in your struct to get the number of occurence of a flag, you should now add parse(from_occurrences) on the flag.
For example
#[structopt(short = "v", long = "verbose")]
verbose: u64,must be changed by
#[structopt(short = "v", long = "verbose", parse(from_occurrences))]
verbose: u64,This feature was surprising as shown in #30. Using the parse feature seems much more natural.
Change the signature of Structopt::from_clap to take its argument by reference by @TeXitoi
There was no reason to take the argument by value. Most of the StructOpt users will not be impacted by this change. If you are using StructOpt::from_clap, just add a & before the argument.
Fail if attributes are not used by @TeXitoi
StructOpt was quite fuzzy in its attribute parsing: it was only searching for interresting things, e. g. something like #[structopt(foo(bar))] was accepted but not used. It now fails the compilation.
You should have nothing to do here. This breaking change may highlight some missuse that can be bugs.
In future versions, if there is cases that are not highlighed, they will be considerated as bugs, not breaking changes.
Use raw() wrapping instead of _raw suffixing by @TeXitoi
The syntax of raw attributes is changed to improve the syntax.
You have to change foo_raw = "bar", baz_raw = "foo" by raw(foo = "bar", baz = "foo") or raw(foo = "bar"), raw(baz = "foo").
- Add
parse(from_occurrences)parser by @SergioBenitez - Support 1-uple enum variant as subcommand by @TeXitoi
- structopt-derive crate is now an implementation detail, structopt reexport the custom derive macro by @TeXitoi
- Add the
StructOpt::from_itermethod by @Kerollmops
- Allow opting out of clap default features by @ski-csis
- Fix a bug with optional subsubcommand and Enum by @TeXitoi
- Implement custom string parser from either
&stror&OsStrby @kennytm
- Improve doc by @TeXitoi
- Fix bugs #24 and #25 by @TeXitoi
- Support of methods with something else that a string as argument thanks to
_rawsuffix by @Flakebi
- Better formating of multiple authors by @killercup
- Subcommand support by @williamyaoh
- Using doc comment to populate help by @killercup
- First version with flags, arguments and options support by @TeXitoi