Skip to content

Commit

Permalink
Make x.py d an alias for x.py doc
Browse files Browse the repository at this point in the history
  • Loading branch information
inquisitivecrystal committed Jul 22, 2021
1 parent c9aa259 commit a60f627
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/bootstrap/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -244,6 +244,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
|| (s == "t")
|| (s == "bench")
|| (s == "doc")
|| (s == "d")
|| (s == "clean")
|| (s == "dist")
|| (s == "install")
Expand Down Expand Up @@ -312,7 +313,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
"clippy" => {
opts.optflag("", "fix", "automatically apply lint suggestions");
}
"doc" => {
"doc" | "d" => {
opts.optflag("", "open", "open the docs in a browser");
}
"clean" => {
Expand Down Expand Up @@ -487,7 +488,7 @@ Arguments:
./x.py test --stage 1",
);
}
"doc" => {
"doc" | "d" => {
subcommand_help.push_str(
"\n
Arguments:
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit a60f627

Please sign in to comment.