summaryrefslogtreecommitdiff
path: root/vendor/github.com/urfave/cli/help.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/urfave/cli/help.go')
-rw-r--r--vendor/github.com/urfave/cli/help.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/vendor/github.com/urfave/cli/help.go b/vendor/github.com/urfave/cli/help.go
index ed084fc1d..65874fa2f 100644
--- a/vendor/github.com/urfave/cli/help.go
+++ b/vendor/github.com/urfave/cli/help.go
@@ -158,8 +158,14 @@ func DefaultAppComplete(c *Context) {
if command.Hidden {
continue
}
- for _, name := range command.Names() {
- fmt.Fprintln(c.App.Writer, name)
+ if os.Getenv("_CLI_ZSH_AUTOCOMPLETE_HACK") == "1" {
+ for _, name := range command.Names() {
+ fmt.Fprintf(c.App.Writer, "%s:%s\n", name, command.Usage)
+ }
+ } else {
+ for _, name := range command.Names() {
+ fmt.Fprintf(c.App.Writer, "%s\n", name)
+ }
}
}
}