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 {
65
65
final bool veryVerbose = args.contains ('-vv' );
66
66
final bool verbose = args.contains ('-v' ) || args.contains ('--verbose' ) || veryVerbose;
67
67
final bool prefixedErrors = args.contains ('--prefixed-errors' );
68
- // Support the -? Powershell help idiom .
68
+ // Support universal help idioms .
69
69
final int powershellHelpIndex = args.indexOf ('-?' );
70
70
if (powershellHelpIndex != - 1 ) {
71
71
args[powershellHelpIndex] = '-h' ;
72
72
}
73
+ final int slashQuestionHelpIndex = args.indexOf ('/?' );
74
+ if (slashQuestionHelpIndex != - 1 ) {
75
+ args[slashQuestionHelpIndex] = '-h' ;
76
+ }
73
77
74
78
final bool doctor =
75
79
(args.isNotEmpty && args.first == 'doctor' ) ||
Original file line number Diff line number Diff line change @@ -42,6 +42,19 @@ void main() {
42
42
);
43
43
});
44
44
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
+
45
58
testWithoutContext ('flutter doctor is not verbose' , () async {
46
59
final ProcessResult result = await processManager.run (< String > [flutterBin, 'doctor' , '-v' ]);
47
60
You can’t perform that action at this time.
0 commit comments