diff options
Diffstat (limited to 'run.go')
| -rw-r--r-- | run.go | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -20,10 +20,13 @@ const ( // Run get a command, get the typed arguments from environment // variable, and print out the complete options -func Run(c Command) { +// name is the name of command we want to auto complete. +// IMPORTANT: it must be the same name - if the auto complete +// completes the 'go' command, name must be equal to "go". +func Run(name string, c Command) { args, ok := getLine() if !ok { - cmd.Run(c.Name) + cmd.Run(name) return } Log("Completing args: %s", args) |
