onur / cargo-license

Cargo subcommand to see license of dependencies
MIT License
418 stars 37 forks source link

Use subcommand to improve help message #29

Closed dalance closed 3 years ago

dalance commented 4 years ago

This PR has the same purpose as #27.

Closes: #25 Closes: #23

But the usage of structopt's subcommand can improve help message like below:

$ cargo license --help
cargo-license 0.3.0
Cargo subcommand to see licenses of dependencies.

USAGE:
    cargo license [FLAGS] [OPTIONS]

FLAGS:
        --all-features     Activate all available features
    -a, --authors          Display crate authors
    -d, --do-not-bundle    Output one license per line
    -h, --help             Prints help information
    -j, --json             Detailed output as JSON
        --no-deps          Output information only about the root package and don't fetch dependencies
    -t, --tsv              Detailed output as tab-separated-values
    -V, --version          Prints version information

OPTIONS:
        --current-dir <CURRENT_DIR>    Current directory of the cargo metadata process
        --features <FEATURE>...        Space-separated list of features to activate
        --manifest-path <PATH>         Path to Cargo.toml
jonasmalacofilho commented 3 years ago

I just noticed that while this does improve the help message, it breaks running cargo-license directly.

$ cargo-license       
cargo-license 0.3.0

USAGE:
    cargo <SUBCOMMAND>
...