Skip to content

Commit

Permalink
Auto merge of #10177 - ehuss:list-alias, r=alexcrichton
Browse files Browse the repository at this point in the history
Explicitly mark aliases in `cargo list`.

This I think makes it a little clearer that these are aliases, and matches the form used for built-in aliases.
  • Loading branch information
bors committed Dec 13, 2021
2 parents a4cdd75 + 910569a commit 1ee19f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ")
);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/testsuite/cargo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 1ee19f3

Please sign in to comment.