1 **This requires enabling the [`cargo` feature flag][crate::_features].**
3 You can use `--` to escape further arguments.
5 Let's see what this looks like in the help:
7 $ escaped-positional --help
8 A simple to use, efficient, and full-featured Command Line Argument Parser
10 Usage: escaped-positional[EXE] [OPTIONS] [-- <SLOP>...]
19 -V, --version Print version
23 Here is a baseline without any arguments:
32 Notice that we can't pass positional arguments before `--`:
34 $ escaped-positional foo bar
36 error: unexpected argument 'foo' found
38 Usage: escaped-positional[EXE] [OPTIONS] [-- <SLOP>...]
40 For more information, try '--help'.
46 $ escaped-positional -f -p=bob -- sloppy slop slop
48 -p's value: Some("bob")
49 'slops' values: ["sloppy", "slop", "slop"]
53 As mentioned, the parser will directly pass everything through:
55 $ escaped-positional -- -f -p=bob sloppy slop slop
58 'slops' values: ["-f", "-p=bob", "sloppy", "slop", "slop"]