File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,7 +331,15 @@ pub trait CommandExt: Sized {
331331 }
332332
333333 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+ } ;
334341 self . _arg ( flag ( "quiet" , "Do not print cargo log messages" ) . short ( 'q' ) )
342+ . _arg ( unsupported_silent_arg)
335343 }
336344
337345 fn arg_timings ( self ) -> Self {
Original file line number Diff line number Diff line change @@ -46,9 +46,9 @@ fn unsupported_silent_arg() {
4646 p. cargo ( "run -s" )
4747 . with_stderr (
4848 "\
49- error: unexpected argument '-s ' found
49+ error: unexpected argument '--silent ' found
5050
51- tip: to pass '-s' as a value, use '-- -s '
51+ tip: a similar argument exists: '--quiet '
5252
5353Usage: cargo run [OPTIONS] [args]...
5454
@@ -63,7 +63,7 @@ For more information, try '--help'.
6363 "\
6464 error: unexpected argument '--silent' found
6565
66- tip: to pass '--silent' as a value, use '-- --silent '
66+ tip: a similar argument exists: '--quiet '
6767
6868Usage: cargo run [OPTIONS] [args]...
6969
You can’t perform that action at this time.
0 commit comments