3

Show `--help` if there is no man page for subcommand by hi-rustin · Pull Request...

 1 year ago
source link: https://github.com/rust-lang/cargo/pull/11473
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Member

@hi-rustin hi-rustin commented Dec 12, 2022

edited

What does this PR try to resolve?

part of #11408

  • Show --help if there is no man page for the subcommand
  • Do not suggest cargo help config until we add a man page.

How should we test and review this PR?

  1. build cargo
  2. try cargo help config
➜  cargo git:(master) ✗ ./target/debug/cargo help config
Inspect configuration values

Usage: cargo config [OPTIONS] <COMMAND>

Commands:
  get  

Options:
  -v, --verbose...          Use verbose output (-vv very verbose/build.rs output)
      --color <WHEN>        Coloring: auto, always, never
      --frozen              Require Cargo.lock and cache are up to date
      --locked              Require Cargo.lock is up to date
      --offline             Run without accessing the network
      --config <KEY=VALUE>  Override a configuration value
  -Z <FLAG>                 Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
  -h, --help                Print help information

Additional information

I am not sure I should add a test for it because I think we will add a man page for config.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK