]> git.proxmox.com Git - cargo.git/commitdiff
Explicitly mark aliases in `cargo list`.
authorEric Huss <eric@huss.org>
Mon, 6 Dec 2021 22:02:21 +0000 (14:02 -0800)
committerEric Huss <eric@huss.org>
Mon, 6 Dec 2021 22:02:21 +0000 (14:02 -0800)
src/bin/cargo/cli.rs
tests/testsuite/cargo_command.rs

index d4da7276b25179ab2b2952023882301bde940b3a..b4e1ddaf5d1cbce13b1578991d96cb124af9678c 100644 (file)
@@ -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(" ")
+                    );
                 }
             }
         }
index 86e53ce757cea918373eee94ab3e626d55e81e55..b814713f1d2fd09727c5a58c7f53580f96319519 100644 (file)
@@ -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();
 }