Expand description
Shared command-line plumbing: colour, argument parsing and the renderers.
NO CLI FRAMEWORK. Argument parsing here is a few dozen lines over std::env::args_os, which is
the house rule and is also the only way to get the exact behaviour these tools need: -- ends
options so a file genuinely named --force.jpg is a file, and an unknown flag is an error
rather than a positional.
Structs§
- Args
- A parsed command line: flags that were present, options with values, and the positionals.
Enums§
Constants§
Functions§
- c
- Wrap in a colour, or do not, depending on where output is going.
- colour_
enabled - command_
path - A path as it should be typed back at a shell. The
--matters: without it a file named--force.jpgreads as a flag, and the suggestion this tool prints would not work. - for_
each_ file - Walk the file list, refusing anything that is not an ordinary file, and hand each survivor to
each. Returns true if anything failed, which becomes the exit status. - print_
platforms - print_
report - Print one inspection report the way
snitchprints it. Returns true when something went wrong enough for a non-zero exit, which today means only a failed C2PA check. - quiet_
on_ closed_ pipe - Let a closed pipe end the process quietly, the way every other Unix command does.
- shell_
quote - thousands