Skip to main content

Module argv

Module argv 

Source
Expand description

Command line parsing compatible with minimist (as re-exported by zx) and zx’s parseArgv wrapper.

Results are returned as a serde_json::Value object so that repeated flags (arrays), dotted keys (nested objects), numbers, booleans and strings can all be represented. Positional arguments live under "_".

Structs§

ArgvOptions
Options for minimist and parse_argv.

Enums§

Booleans
Which flags are booleans.

Functions§

argv
Parse the current process arguments (without the program name).
minimist
Parse args like the minimist package.
parse_argv
zx parseArgv(args, opts, defs): run minimist and merge the result into defs, optionally camel-casing keys and parsing boolean strings.

Type Aliases§

UnknownFn
Callback for flags and positionals that were not declared; returning false drops the argument.