docopt.rs icon indicating copy to clipboard operation
docopt.rs copied to clipboard

Docopt for Rust (command line argument parser).

Results 49 docopt.rs issues
Sort by recently updated
recently updated
newest added

**Describe the bug** Found a bug with optional arguments and final array. **To Reproduce** Define a docopt like this one in a shell script: ```bash #!/usr/bin/env bash ##? Install a...

``` ./doppler const Invalid arguments. Usage: doppler (const (--samplerate | -s ) --intype --shift ) doppler (track (--samplerate | -s ) --intype --tlefile --tlename --location --freq ) [--time ] [--shift...

enhancement

```rust const MAIN_USAGE: &str = " Usage: cargo deadlinks [--dir ] "; fn main() { let args: MainArgs = Docopt::new(MAIN_USAGE) .and_then(|d| { d.version(Some(env!("CARGO_PKG_VERSION").to_owned())) .deserialize() }) .unwrap_or_else(|e| e.exit()); dbg!(&args); ``` ```...

get_vec returns Vec. Unfortunately the borrow checker interprets this to make the first argument to get_vec also have static scope, ala https://stackoverflow.com/questions/58436950/argument-requires-that-is-borrowed-for-static-how-do-i-work-round-this. There do not seem to be any good...

The following example: ```rust use docopt::Docopt; use serde::Deserialize; const USAGE: &'static str = " Test. Usage: test [--cache_dir=] Options: --cache_dir= enables cache "; #[derive(Debug, Deserialize)] struct Args { flag_cache_dir: Option,...

I have this usage string here, nearly verbatim: ``` Validates and packages a ***** project folder. Usage: *******-packer [--output=FILE] *******-packer (--help | --version) Options: --help # Display this help message....

When calling a binary, some users forget how some arguments work and simply add a `-h` to see the help again, without removing all parameters. job a/long/path.gz another/long/path.gz a/long/path/again.gz -h...

I'm trying to write the following doc string to have a form for the `-s` flag, and also provide it documentation. ``` Usage: oursh -c [options] [ [...]] Options: -c...

The following works in Python: ```python import docopt __doc__ = """\ Usage: test.py [--flag] [--another] """ args = docopt.docopt(__doc__) print(args) ``` ``` $ ./test.py --flag {'--another': False, '--flag': True} $...