OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 library args.command_runner; | |
6 | |
7 import 'dart:async'; | 5 import 'dart:async'; |
8 import 'dart:collection'; | 6 import 'dart:collection'; |
9 import 'dart:math' as math; | 7 import 'dart:math' as math; |
10 | 8 |
11 import 'src/arg_parser.dart'; | 9 import 'src/arg_parser.dart'; |
12 import 'src/arg_results.dart'; | 10 import 'src/arg_results.dart'; |
13 import 'src/help_command.dart'; | 11 import 'src/help_command.dart'; |
14 import 'src/usage_exception.dart'; | 12 import 'src/usage_exception.dart'; |
15 import 'src/utils.dart'; | 13 import 'src/utils.dart'; |
16 | 14 |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 var buffer = | 371 var buffer = |
374 new StringBuffer('Available ${isSubcommand ? "sub" : ""}commands:'); | 372 new StringBuffer('Available ${isSubcommand ? "sub" : ""}commands:'); |
375 for (var name in names) { | 373 for (var name in names) { |
376 buffer.writeln(); | 374 buffer.writeln(); |
377 buffer.write(' ${padRight(name, length)} ' | 375 buffer.write(' ${padRight(name, length)} ' |
378 '${commands[name].description.split("\n").first}'); | 376 '${commands[name].description.split("\n").first}'); |
379 } | 377 } |
380 | 378 |
381 return buffer.toString(); | 379 return buffer.toString(); |
382 } | 380 } |
OLD | NEW |