Expand description
Zero-dependency argument parser.
Given a Command spec and the raw arguments, produces Matches: the
resolved positional values and flag values. Supports:
--long valueand--long=value-s valueand-svalue- bundled boolean shorts:
-abc==-a -b -c --to stop flag parsing; everything after is positional- variadic trailing positionals
Parse errors are crate::error::Error with the USAGE exit code.
Structs§
- Matches
- The result of parsing: flag values and positional arguments by name.
Functions§
- parse
- Parse
rawagainstcmd.rawshould exclude the program name and the subcommand token (i.e. just the arguments to this command).