Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display alias target on 'cargo help <alias>` #10193

Merged
merged 6 commits into from
Dec 14, 2021

Commits on Dec 11, 2021

  1. Display alias target on 'cargo help <alias>`. Closes rust-lang#10138

    Previously, `cargo help <alias>` resolved the alias and displayed the
    help for the targeted subcommand. For example, if `br` were aliased to
    `build --release`, `cargo help br` would display the manpage for
    cargo-build.
    
    With this patch, it will print "'br' is aliased to 'build --release'".
    sstangl committed Dec 11, 2021
    Configuration menu
    Copy the full SHA
    7084570 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e77b254 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2021

  1. Update src/bin/cargo/commands/help.rs

    Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
    sstangl and weihanglo authored Dec 12, 2021
    Configuration menu
    Copy the full SHA
    dc0bc58 View commit details
    Browse the repository at this point in the history
  2. Simplify check_alias() using flatten()

    Co-authored-by: Weihang Lo <weihanglo@users.noreply.github.com>
    sstangl and weihanglo committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    8a1af70 View commit details
    Browse the repository at this point in the history
  3. Update behavior to pass-through simple aliases

    This changes the behavior so that simple aliases that directly alias a
    subcommand (with no arguments) pass-through to that subcommand, while
    complex aliases (with arguments) show the alias.
    
    So for example, `cargo help b` will show the manpage for `cargo-build`,
    while `cargo help my-alias`, aliased to `build --release`, will show
    "`my-alias` is aliased to `build --release`".
    sstangl committed Dec 12, 2021
    Configuration menu
    Copy the full SHA
    6df4b1e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4c66d18 View commit details
    Browse the repository at this point in the history