From 7c18354c1c304277a2150c74a50f0acf5ce0a79e Mon Sep 17 00:00:00 2001 From: Sean Chen <40845434+two@users.noreply.github.com> Date: Fri, 31 May 2019 15:33:39 +0800 Subject: [PATCH] terminal: add alias gr for goroutine and grs for goroutines (#1559) --- Documentation/cli/README.md | 2 ++ pkg/terminal/command.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/cli/README.md b/Documentation/cli/README.md index 60d0bbb6..8fd53224 100644 --- a/Documentation/cli/README.md +++ b/Documentation/cli/README.md @@ -241,6 +241,7 @@ Called without arguments it will show information about the current goroutine. Called with a single argument it will switch to the specified goroutine. Called with more arguments it will execute a command on the specified goroutine. +Aliases: gr ## goroutines List program goroutines. @@ -257,6 +258,7 @@ Print out info for every goroutine. The flag controls what information is shown If no flag is specified the default is -u. +Aliases: grs ## help Prints the help message. diff --git a/pkg/terminal/command.go b/pkg/terminal/command.go index 322873c8..459a71c7 100644 --- a/pkg/terminal/command.go +++ b/pkg/terminal/command.go @@ -166,7 +166,7 @@ Current limitations: clearall [] If called with the linespec argument it will delete all the breakpoints matching the linespec. If linespec is omitted all breakpoints are deleted.`}, - {aliases: []string{"goroutines"}, cmdFn: goroutines, helpMsg: `List program goroutines. + {aliases: []string{"goroutines", "grs"}, cmdFn: goroutines, helpMsg: `List program goroutines. goroutines [-u (default: user location)|-r (runtime location)|-g (go statement location)|-s (start location)] [ -t (stack trace)] @@ -179,7 +179,7 @@ Print out info for every goroutine. The flag controls what information is shown -t displays stack trace of goroutine If no flag is specified the default is -u.`}, - {aliases: []string{"goroutine"}, allowedPrefixes: onPrefix, cmdFn: c.goroutine, helpMsg: `Shows or changes current goroutine + {aliases: []string{"goroutine", "gr"}, allowedPrefixes: onPrefix, cmdFn: c.goroutine, helpMsg: `Shows or changes current goroutine goroutine goroutine -- GitLab