From 910569aac3c7bcaad7ddf876e73b712c5c412d99 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Mon, 6 Dec 2021 14:02:21 -0800 Subject: [PATCH] Explicitly mark aliases in `cargo list`. --- src/bin/cargo/cli.rs | 7 ++++++- tests/testsuite/cargo_command.rs | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/bin/cargo/cli.rs b/src/bin/cargo/cli.rs index d4da7276b25..b4e1ddaf5d1 100644 --- a/src/bin/cargo/cli.rs +++ b/src/bin/cargo/cli.rs @@ -139,7 +139,12 @@ Run with 'cargo -Z [FLAG] [SUBCOMMAND]'", } } CommandInfo::Alias { target } => { - drop_println!(config, " {:<20} {}", name, target.iter().join(" ")); + drop_println!( + config, + " {:<20} alias: {}", + name, + target.iter().join(" ") + ); } } } diff --git a/tests/testsuite/cargo_command.rs b/tests/testsuite/cargo_command.rs index 86e53ce757c..b814713f1d2 100644 --- a/tests/testsuite/cargo_command.rs +++ b/tests/testsuite/cargo_command.rs @@ -57,8 +57,8 @@ fn list_custom_aliases_with_descriptions() { .build(); p.cargo("--list") - .with_stdout_contains(" myaliasstr foo --bar") - .with_stdout_contains(" myaliasvec foo --bar") + .with_stdout_contains(" myaliasstr alias: foo --bar") + .with_stdout_contains(" myaliasvec alias: foo --bar") .run(); }