Crate pico_args[−][src]
An ultra simple CLI arguments parser.
If you think that this library doesn’t support some feature, it’s probably intentional.
- No help generation.
- Only flags, options, free arguments and subcommands are supported.
- No combined flags (like
-vvvor-abc). - Options can be separated by a space,
=or nothing. See build features. - Arguments can be in any order.
- Non UTF-8 arguments are supported.
Build features
-
eq-separatorAllows parsing arguments separated by
=. Enabled by default.
This feature adds about 1KiB to the resulting binary. -
short-space-optMakes the space between short keys and their values optional (e.g.
-w10).
Ifeq-separatoris enabled, then it takes precedence and the ‘=’ is not included.
Ifeq-separatoris disabled, then-K=valuegives an error instead of returning"=value".
The optional space is only applicable for short keys because--keyvaluewould be ambiguous. -
combined-flagsAllows combination of flags, e.g.-abcinstead of-a -b -c. Ifshort-space-optoreq-separatorare enabled, you must parse flags after values, to prevent ambiguities.
Structs
| Arguments | An arguments parser. |
Enums
| Error | A list of possible errors. |