summaryrefslogtreecommitdiff
path: root/vendor/github.com/urfave/cli/help.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@suse.com>2018-07-04 14:10:06 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-05 10:43:17 +0000
commit49fe03c626dc10781f2d3241a489c95515af9db4 (patch)
tree692558deab5e7cec0d7855f954b4842470330541 /vendor/github.com/urfave/cli/help.go
parentf2462ca59e4a48b9f23e3c8f2acaa8bce60d588d (diff)
downloadpodman-49fe03c626dc10781f2d3241a489c95515af9db4.tar.gz
podman-49fe03c626dc10781f2d3241a489c95515af9db4.tar.bz2
podman-49fe03c626dc10781f2d3241a489c95515af9db4.zip
urfave/cli: fix parsing of short opts
Vendor an updated version of urfave/cli to fix the parsing of short options. Until the fix is merged upstream, vendor the code from github.com/vrothberg/cli containing both, the latest urfave/cli and the bug fix. Fixes: #714 Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1046 Approved by: rhatdan
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)
+ }
}
}
}