structopt
structopt copied to clipboard
Parse command line arguments by defining a struct.
See individual commits. I realize this crate is deprecated in favor of clap, but it still seems to enjoy some 10,000-40,000 downloads per day over the past three months. Updating...
This is a small idea as it relates to the use of structopt in production environments. It would be useful if a struct, in a multi-nested struct configuration, could be...
``` --> /home/cacilhas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.59/src/lib.rs:92:30 | 92 | feature(proc_macro_span, proc_macro_span_shrink) | ``` Versions 0.2.18 until 0.3.26, stopped working in nightly 0.72.
structopt is a derive wrapper around clap v2. As of clap v3, the derive wrapper is included with clap under the `derive` feature flag. A [migration guide](https://github.com/clap-rs/clap/blob/v3-master/CHANGELOG.md#migrating) is available for...
I would like to have an ability to do something like this: ```rust #[structopt(long, conflicts_with = "bar")] pub foo: bool, #[structopt(flatten)] pub bar: BarParams, ``` This means that if `foo`...
With `clap-verbosity-flag` "3.0.0" ``` use structopt::StructOpt; use clap_verbosity_flag::Verbosity; #[derive(Debug, StructOpt)] /// Foo struct Cli { #[structopt(flatten)] verbose: Verbosity, } fn main() { Cli::from_args(); } ``` will cause clap-verbosity-flag's documentation to...
I have a simple program: ```rust use structopt::StructOpt; /// The main thing #[derive(StructOpt)] struct Main { #[structopt(subcommand)] subcommand: Subcommand, } /// The subcommand #[derive(StructOpt)] enum Subcommand { A{} } fn...
I find that when using `-C opt-level=0` as the compilation optimization level, all of the test cases can pass. However, if we use `-C opt-level=1/2/3/s/z`, an error would be triggered....
See individual commits. Extracted from #536 minus the regression.