Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1240)

Unified Diff: utils/pub/pub.dart

Issue 11485012: Clean up command help. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Test command help with options. Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/pub/command_version.dart ('k') | utils/tests/pub/pub_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/pub.dart
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index 21e2e44b46648c132e4e42fd0a9842bb7352a1ec..835a09d5f0e8cfa0f84658caf682027d6b13f81b 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -56,21 +56,21 @@ Map<String, PubCommand> get pubCommands {
ArgParser get pubArgParser {
var parser = new ArgParser();
parser.addFlag('help', abbr: 'h', negatable: false,
- help: 'print this usage information');
+ help: 'Print this usage information.');
parser.addFlag('version', negatable: false,
- help: 'print the version of pub');
+ help: 'Print pub version.');
parser.addFlag('trace',
- help: 'print debugging information when an error occurs');
+ help: 'Print debugging information when an error occurs.');
parser.addOption('verbosity',
- help: 'control output verbosity',
+ help: 'Control output verbosity.',
allowed: ['normal', 'io', 'all'],
allowedHelp: {
- 'normal': 'errors, warnings, and user messages are shown',
- 'io': 'IO operations are also shown',
- 'all': 'all output including internal tracing messages are shown'
+ 'normal': 'Errors, warnings, and user messages are shown.',
+ 'io': 'IO operations are also shown.',
+ 'all': 'All output including internal tracing messages are shown.'
});
parser.addFlag('verbose', abbr: 'v', negatable: false,
- help: 'shortcut for "--verbosity=all"');
+ help: 'Shortcut for "--verbosity=all"');
return parser;
}
@@ -297,13 +297,11 @@ abstract class PubCommand {
if (description == null) description = this.description;
var buffer = new StringBuffer();
- buffer.add(description);
- buffer.add('');
- buffer.add('Usage: $usage');
+ buffer.add('$description\n\nUsage: $usage');
var commandUsage = commandParser.getUsage();
if (!commandUsage.isEmpty) {
- buffer.add('');
+ buffer.add('\n');
buffer.add(commandUsage);
}
« no previous file with comments | « utils/pub/command_version.dart ('k') | utils/tests/pub/pub_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698