| Index: lib/command_runner.dart
|
| diff --git a/lib/command_runner.dart b/lib/command_runner.dart
|
| index 3cc952ec63bf6d90658b8f4eae24f9d0852f8ca4..d0cbf261b9a28e2cd29dd53a462eb1f35451485b 100644
|
| --- a/lib/command_runner.dart
|
| +++ b/lib/command_runner.dart
|
| @@ -190,9 +190,15 @@ abstract class Command {
|
| /// The name of this command.
|
| String get name;
|
|
|
| - /// A short description of this command.
|
| + /// A description of this command, included in [usage].
|
| String get description;
|
|
|
| + /// A short description of this command, included in [parent]'s
|
| + /// [CommandRunner.usage].
|
| + ///
|
| + /// This defaults to the first line of [description].
|
| + String get summary => description.split("\n").first;
|
| +
|
| /// A single-line template for how to invoke this command (e.g. `"pub get
|
| /// [package]"`).
|
| String get invocation {
|
| @@ -371,7 +377,7 @@ String _getCommandUsage(Map<String, Command> commands,
|
| var buffer =
|
| new StringBuffer('Available ${isSubcommand ? "sub" : ""}commands:');
|
| for (var name in names) {
|
| - var lines = commands[name].description.split("\n");
|
| + var lines = commands[name].summary.split("\n");
|
| buffer.writeln();
|
| buffer.write(' ${padRight(name, length)} ${lines.first}');
|
|
|
|
|