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 builtin aliases with cargo --list #8542

Merged
merged 5 commits into from
Jul 28, 2020
Merged

Commits on Apr 27, 2020

  1. Merge pull request #1 from rust-lang/master

    Update fork
    CPerezz authored Apr 27, 2020
    Configuration menu
    Copy the full SHA
    7553724 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2020

  1. Configuration menu
    Copy the full SHA
    d83a2d6 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2020

  1. Print builtin aliases with cargo --list command

    As stated in rust-lang#8486 it would help to the discovery of the
    builtin aliases the facto of printing them with the
    `cargo --list` command.
    
    - Extracted the builtin aliases currently implemented to a
    sepparated `const`.
    - Make all of the functions that interact with these aliases
    point to that function.
    - Refactored the `list_commands` fn in order to include with the
    builtin and external commands, the builtin aliases that come with
    cargo by defaut.
    CPerezz committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    26beca0 View commit details
    Browse the repository at this point in the history
  2. Add test for listing builtin aliases

    Added a test that checks that the aliases that currently
    are builtin with cargo are indeed being printed with the rest
    of the commands when `cargo --list` is called.
    
    Closes rust-lang#8486
    CPerezz committed Jul 24, 2020
    Configuration menu
    Copy the full SHA
    7b16c7c View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2020

  1. Remomve builtin_aliases duplicate declaration

    As @ehuss correctly suggested, we could just declare
    in one `const` structure for every builtin alias the
    following: `(alias, aliased_command, description)`.
    
    Therefore, the suggestion has been applied and the
    `BUILTIN_ALIASES` const has been refactored.
    
    Also, the `builtin_aliases_execs` now parses the
    `BUILTIN_ALIASES` const searching for a
    "possible alias command" returning an option with the
    previous info structure or `None`.
    CPerezz committed Jul 28, 2020
    Configuration menu
    Copy the full SHA
    2ae8df6 View commit details
    Browse the repository at this point in the history