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

Unified Diff: runtime/observatory/lib/src/cli/command.dart

Issue 984683002: Allow command aliases in Observatory debugger. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 5 years, 10 months 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 | « no previous file | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/lib/src/cli/command.dart
diff --git a/runtime/observatory/lib/src/cli/command.dart b/runtime/observatory/lib/src/cli/command.dart
index 30a78748218935bbb376cf627530e07b19fb9f33..295c743bb9722565dfba88b46fdbe4d4f1a32b9f 100644
--- a/runtime/observatory/lib/src/cli/command.dart
+++ b/runtime/observatory/lib/src/cli/command.dart
@@ -50,7 +50,7 @@ abstract class _CommandBase {
var matches = new List<Command>();
for (var child in _children) {
if (child.name.startsWith(arg)) {
- if (preferExact && child.name == arg) {
+ if (preferExact && ((child.name == arg) || (child.alias == arg))) {
return [child];
}
matches.add(child);
@@ -220,6 +220,8 @@ abstract class Command extends _CommandBase {
Command(this.name, List<Command> children) : super(children);
final String name;
+ String alias;
+
String get fullName {
if (_parent is RootCommand) {
return name;
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698