File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,11 @@ import 'src/web/web_runner.dart';
6060Future <void > main (List <String > args) async {
6161 final bool veryVerbose = args.contains ('-vv' );
6262 final bool verbose = args.contains ('-v' ) || args.contains ('--verbose' ) || veryVerbose;
63+ // Support the -? Powershell help idiom.
64+ final int powershellHelpIndex = args.indexOf ('-?' );
65+ if (powershellHelpIndex != - 1 ) {
66+ args[powershellHelpIndex] = '-h' ;
67+ }
6368
6469 final bool doctor = (args.isNotEmpty && args.first == 'doctor' ) ||
6570 (args.length == 2 && verbose && args.last == 'doctor' );
Original file line number Diff line number Diff line change @@ -33,6 +33,21 @@ void main() {
3333 expect (result.stdout, isNot (contains ('exiting with code 0' )));
3434 });
3535
36+ testWithoutContext ('Flutter help is shown with -? command line argument' , () async {
37+ final String flutterBin = fileSystem.path.join (getFlutterRoot (), 'bin' , 'flutter' );
38+ final ProcessResult result = await processManager.run (< String > [
39+ flutterBin,
40+ ...getLocalEngineArguments (),
41+ '-?' ,
42+ ]);
43+
44+ // Development tools.
45+ expect (result.stdout, contains (
46+ 'Run "flutter help <command>" for more information about a command.\n '
47+ 'Run "flutter help -v" for verbose help output, including less commonly used options.'
48+ ));
49+ });
50+
3651 testWithoutContext ('flutter doctor is not verbose' , () async {
3752 final String flutterBin = fileSystem.path.join (getFlutterRoot (), 'bin' , 'flutter' );
3853 final ProcessResult result = await processManager.run (< String > [
You can’t perform that action at this time.
0 commit comments