@@ -106,18 +106,18 @@ impl Flags {
106
106
Usage: x.py <subcommand> [options] [<paths>...]
107
107
108
108
Subcommands:
109
- build Compile either the compiler or libraries
110
- check Compile either the compiler or libraries, using cargo check
109
+ build, b Compile either the compiler or libraries
110
+ check, c Compile either the compiler or libraries, using cargo check
111
111
clippy Run clippy (uses rustup/cargo-installed clippy binary)
112
112
fix Run cargo fix
113
113
fmt Run rustfmt
114
- test Build and run some test suites
114
+ test, t Build and run some test suites
115
115
bench Build and run some benchmarks
116
116
doc Build documentation
117
117
clean Clean out build directories
118
118
dist Build distribution artifacts
119
119
install Install distribution artifacts
120
- run Run tools contained in this repository
120
+ run, r Run tools contained in this repository
121
121
122
122
To learn more about a subcommand, run `./x.py <subcommand> -h`" ,
123
123
) ;
@@ -184,17 +184,21 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
184
184
// there on out.
185
185
let subcommand = args. iter ( ) . find ( |& s| {
186
186
( s == "build" )
187
+ || ( s == "b" )
187
188
|| ( s == "check" )
189
+ || ( s == "c" )
188
190
|| ( s == "clippy" )
189
191
|| ( s == "fix" )
190
192
|| ( s == "fmt" )
191
193
|| ( s == "test" )
194
+ || ( s == "t" )
192
195
|| ( s == "bench" )
193
196
|| ( s == "doc" )
194
197
|| ( s == "clean" )
195
198
|| ( s == "dist" )
196
199
|| ( s == "install" )
197
200
|| ( s == "run" )
201
+ || ( s == "r" )
198
202
} ) ;
199
203
let subcommand = match subcommand {
200
204
Some ( s) => s,
@@ -210,7 +214,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
210
214
211
215
// Some subcommands get extra options
212
216
match subcommand. as_str ( ) {
213
- "test" => {
217
+ "test" | "t" => {
214
218
opts. optflag ( "" , "no-fail-fast" , "Run all tests regardless of failure" ) ;
215
219
opts. optmulti ( "" , "test-args" , "extra arguments" , "ARGS" ) ;
216
220
opts. optmulti (
@@ -285,7 +289,7 @@ To learn more about a subcommand, run `./x.py <subcommand> -h`",
285
289
}
286
290
// Extra help text for some commands
287
291
match subcommand. as_str ( ) {
288
- "build" => {
292
+ "build" | "b" => {
289
293
subcommand_help. push_str (
290
294
"\n
291
295
Arguments:
@@ -312,7 +316,7 @@ Arguments:
312
316
Once this is done, build/$ARCH/stage1 contains a usable compiler." ,
313
317
) ;
314
318
}
315
- "check" => {
319
+ "check" | "c" => {
316
320
subcommand_help. push_str (
317
321
"\n
318
322
Arguments:
@@ -362,7 +366,7 @@ Arguments:
362
366
./x.py fmt --check" ,
363
367
) ;
364
368
}
365
- "test" => {
369
+ "test" | "t" => {
366
370
subcommand_help. push_str (
367
371
"\n
368
372
Arguments:
@@ -407,7 +411,7 @@ Arguments:
407
411
./x.py doc --stage 1" ,
408
412
) ;
409
413
}
410
- "run" => {
414
+ "run" | "r" => {
411
415
subcommand_help. push_str (
412
416
"\n
413
417
Arguments:
@@ -453,11 +457,11 @@ Arguments:
453
457
}
454
458
455
459
let cmd = match subcommand. as_str ( ) {
456
- "build" => Subcommand :: Build { paths } ,
457
- "check" => Subcommand :: Check { paths } ,
460
+ "build" | "b" => Subcommand :: Build { paths } ,
461
+ "check" | "c" => Subcommand :: Check { paths } ,
458
462
"clippy" => Subcommand :: Clippy { paths } ,
459
463
"fix" => Subcommand :: Fix { paths } ,
460
- "test" => Subcommand :: Test {
464
+ "test" | "t" => Subcommand :: Test {
461
465
paths,
462
466
bless : matches. opt_present ( "bless" ) ,
463
467
compare_mode : matches. opt_str ( "compare-mode" ) ,
@@ -487,7 +491,7 @@ Arguments:
487
491
"fmt" => Subcommand :: Format { check : matches. opt_present ( "check" ) } ,
488
492
"dist" => Subcommand :: Dist { paths } ,
489
493
"install" => Subcommand :: Install { paths } ,
490
- "run" => {
494
+ "run" | "r" => {
491
495
if paths. is_empty ( ) {
492
496
println ! ( "\n run requires at least a path!\n " ) ;
493
497
usage ( 1 , & opts, & subcommand_help, & extra_help) ;
0 commit comments