structopt v0.3.6 Release Notes
Release Date: 2019-12-22 // over 4 years ago-
๐ This is unusually big patch release. It contains a number of bugfixes and ๐ new features, some of them may theoretically be considered breaking. We did our best to avoid any problems on user's side but, if it wasn't good enough, please file an issue ASAP.
๐ Bugfixes
structopt
used to treat::path::to::type::Vec<T>
asVec<T>
special type. This was considered erroneous. (same forOption<T>
andbool
). Now only exactVec<T>
match is a special type.#[structopt(version = expr)]
whereexpr
is not a string literal used to get overridden by auto generated.version()
call, incorrectly. Now it doesn't.๐ Fixed bug with top-level
App::*
calls on multiplestruct
s, see #289.๐ Positional
bool
args with no explicit#[structopt(parse(...))]
annotation are now prohibited. This couldn't work well anyway, see this example for details.Now we've instituted strict priority between doc comments, about, help, and the like. See the documentation.
HUGE THANKS to
@ssokolow
for tidying up our documentation, teaching me English and explaining why our doc used to suck. I promise I'll make the rest of the doc up to your standards... sometime later!๐ New features
- Implement
StructOpt
forBox<impl StructOpt>
so from now on you can useBox<T>
withflatten
andsubcommand
(#304).
enum Command { #[structopt(name = "version")] PrintVersion, #[structopt(name = "second")] DoSomething { #[structopt(flatten)] config: Box<DoSomethingConfig>, }, #[structopt(name = "first")] DoSomethingElse { #[structopt(flatten)] config: Box<DoSomethingElseConfig>, } }
Introduced
#[structopt(verbatim_doc_comment)]
attribute that keeps line breaks in doc comments, see the documentation.Introduced
#[structopt(rename_all_env)]
and#[structopt(env)]
magical methods so you can derive env var's name from field's name. See the documentation.
๐ Improvements
Now we have nice README for our examples, check it out!
Some error messages were improved and clarified, thanks for all people involved!