File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -331,7 +331,15 @@ pub trait CommandExt: Sized {
331
331
}
332
332
333
333
fn arg_quiet ( self ) -> Self {
334
+ let unsupported_silent_arg = {
335
+ let value_parser = UnknownArgumentValueParser :: suggest_arg ( "--quiet" ) ;
336
+ flag ( "silent" , "" )
337
+ . short ( 's' )
338
+ . value_parser ( value_parser)
339
+ . hide ( true )
340
+ } ;
334
341
self . _arg ( flag ( "quiet" , "Do not print cargo log messages" ) . short ( 'q' ) )
342
+ . _arg ( unsupported_silent_arg)
335
343
}
336
344
337
345
fn arg_timings ( self ) -> Self {
Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ fn unsupported_silent_arg() {
46
46
p. cargo ( "run -s" )
47
47
. with_stderr (
48
48
"\
49
- error: unexpected argument '-s ' found
49
+ error: unexpected argument '--silent ' found
50
50
51
- tip: to pass '-s' as a value, use '-- -s '
51
+ tip: a similar argument exists: '--quiet '
52
52
53
53
Usage: cargo run [OPTIONS] [args]...
54
54
@@ -63,7 +63,7 @@ For more information, try '--help'.
63
63
"\
64
64
error: unexpected argument '--silent' found
65
65
66
- tip: to pass '--silent' as a value, use '-- --silent '
66
+ tip: a similar argument exists: '--quiet '
67
67
68
68
Usage: cargo run [OPTIONS] [args]...
69
69
You can’t perform that action at this time.
0 commit comments