From a60f6275fd5e73651a567e9effceac5c32644420 Mon Sep 17 00:00:00 2001 From: inquisitivecrystal <22333129+inquisitivecrystal@users.noreply.github.com> Date: Wed, 21 Jul 2021 00:50:12 -0700 Subject: [PATCH] Make `x.py d` an alias for `x.py doc` --- src/bootstrap/flags.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/flags.rs b/src/bootstrap/flags.rs index 80a60c79edfe4..1b7614b29896f 100644 --- a/src/bootstrap/flags.rs +++ b/src/bootstrap/flags.rs @@ -152,7 +152,7 @@ Subcommands: fmt Run rustfmt test, t Build and run some test suites bench Build and run some benchmarks - doc Build documentation + doc, d Build documentation clean Clean out build directories dist Build distribution artifacts install Install distribution artifacts @@ -244,6 +244,7 @@ To learn more about a subcommand, run `./x.py -h`", || (s == "t") || (s == "bench") || (s == "doc") + || (s == "d") || (s == "clean") || (s == "dist") || (s == "install") @@ -312,7 +313,7 @@ To learn more about a subcommand, run `./x.py -h`", "clippy" => { opts.optflag("", "fix", "automatically apply lint suggestions"); } - "doc" => { + "doc" | "d" => { opts.optflag("", "open", "open the docs in a browser"); } "clean" => { @@ -487,7 +488,7 @@ Arguments: ./x.py test --stage 1", ); } - "doc" => { + "doc" | "d" => { subcommand_help.push_str( "\n Arguments: @@ -573,7 +574,7 @@ Arguments: }, }, "bench" => Subcommand::Bench { paths, test_args: matches.opt_strs("test-args") }, - "doc" => Subcommand::Doc { paths, open: matches.opt_present("open") }, + "doc" | "d" => Subcommand::Doc { paths, open: matches.opt_present("open") }, "clean" => { if !paths.is_empty() { println!("\nclean does not take a path argument\n");