This gives a better responses when users don't specify -h or don't pass in a valid argument combinartion.
E.g before this change, I get an error when running cargo spdx -h:
$ cargo spdx -h
error: cargo-spdx 0.1.0
Generate an SPDX SBOM for a crate
USAGE:
cargo spdx [OPTIONS]
OPTIONS:
-f, --format <FORMAT> The output format to use: 'kv' (default), 'json', 'yaml', 'rdf'
-F, --force Force the output, replacing any existing file with the same name
-h, --help Print help information
-H, --host-url <HOST_URL> The URL where the SBOM will be hosted. Must be unique for each SBOM
-n, --no-interact Do not run interactively
-o, --output <OUTPUT> The path of the desired output file
-V, --version Print version information
After:
$ cargo spdx -h
cargo-spdx 0.1.0
Generate an SPDX SBOM for a crate
USAGE:
cargo spdx [OPTIONS]
OPTIONS:
-f, --format <FORMAT> The output format to use: 'kv' (default), 'json', 'yaml', 'rdf'
-F, --force Force the output, replacing any existing file with the same name
-h, --help Print help information
-H, --host-url <HOST_URL> The URL where the SBOM will be hosted. Must be unique for each SBOM
-n, --no-interact Do not run interactively
-o, --output <OUTPUT> The path of the desired output file
-V, --version Print version information
This gives a better responses when users don't specify
-h
or don't pass in a valid argument combinartion.E.g before this change, I get an error when running
cargo spdx -h
:After:
Second one has color terminal support too.