File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,15 @@ Future<void> main(List<String> args) async {
6565 final bool veryVerbose = args.contains ('-vv' );
6666 final bool verbose = args.contains ('-v' ) || args.contains ('--verbose' ) || veryVerbose;
6767 final bool prefixedErrors = args.contains ('--prefixed-errors' );
68- // Support the -? Powershell help idiom .
68+ // Support universal help idioms .
6969 final int powershellHelpIndex = args.indexOf ('-?' );
7070 if (powershellHelpIndex != - 1 ) {
7171 args[powershellHelpIndex] = '-h' ;
7272 }
73+ final int slashQuestionHelpIndex = args.indexOf ('/?' );
74+ if (slashQuestionHelpIndex != - 1 ) {
75+ args[slashQuestionHelpIndex] = '-h' ;
76+ }
7377
7478 final bool doctor =
7579 (args.isNotEmpty && args.first == 'doctor' ) ||
Original file line number Diff line number Diff line change @@ -42,6 +42,19 @@ void main() {
4242 );
4343 });
4444
45+ testWithoutContext ('Flutter help is shown with /? command line argument' , () async {
46+ final ProcessResult result = await processManager.run (< String > [flutterBin, '/?' ]);
47+
48+ // Development tools.
49+ expect (
50+ result.stdout,
51+ contains (
52+ 'Run "flutter help <command>" for more information about a command.\n '
53+ 'Run "flutter help -v" for verbose help output, including less commonly used options.' ,
54+ ),
55+ );
56+ });
57+
4558 testWithoutContext ('flutter doctor is not verbose' , () async {
4659 final ProcessResult result = await processManager.run (< String > [flutterBin, 'doctor' , '-v' ]);
4760
You can’t perform that action at this time.
0 commit comments