usage explain
- Usage:
usage explain [FLAGS] [ARGV]… - Effect: read-only
- Source code:
cli/src/cli/explain.rs
Explain what a command line binds to
Prints a row per argv token saying what it became, then the values that came from somewhere other than argv, then anything that went wrong. Exits 0 even when the explained command line does not parse: the report succeeded, and that is the case worth a report.
Arguments
[ARGV]…— The command line to explain, starting with the program nameusage's own flags come before it, and flag parsing ends at the program name, so bothexplain -f f.kdl mycli --env=prodandexplain -f f.kdl -- mycli --env=prodwork. Separate with--when the explained line carries its own: the first--is stillusage's separator, soexplain -f f.kdl mycli a -- bloses one.
Flags
-f --file <FILE>— A usage spec file, or a script with a usage shebang; "-" reads stdin-s --spec <SPEC>— The spec itself, as a string, instead of a file--format <FORMAT>— Output formatChoices:
text,jsonDefault:
text--view <VIEW>— A spec-declared executable view to explain-e --env <ENV>— Environment to explain against, as KEY=VALUE, repeatableGiven at all, these are the whole environment: an explanation pasted into a bug report has to mean the same thing on the machine that reads it. Omitted, the process environment is used, which is what an execution would see.
-h --help— Print help