Rollup merge of #95875 - aswild:pr/alias-cmd-paths, r=Mark-Simulacrum

bootstrap: show available paths help text for aliased subcommands

Running `./x.py build -h -v` shows a list of available build targets,
but the short alias `./x.py b -h -v` does not. Fix so that the aliases
behave the same as their spelled out counterparts.
This commit is contained in:
Matthias Krüger 2022-04-11 12:06:55 +02:00 committed by GitHub
commit 69fb8f6349
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -621,9 +621,9 @@ impl<'a> Builder<'a> {
pub fn get_help(build: &Build, subcommand: &str) -> Option<String> {
let kind = match subcommand {
"build" => Kind::Build,
"doc" => Kind::Doc,
"test" => Kind::Test,
"build" | "b" => Kind::Build,
"doc" | "d" => Kind::Doc,
"test" | "t" => Kind::Test,
"bench" => Kind::Bench,
"dist" => Kind::Dist,
"install" => Kind::Install,