diff options
| author | Eyal Posener <[email protected]> | 2017-05-20 22:15:37 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-20 22:15:37 +0300 |
| commit | 5ba73666ab38b2d2524b42bf3dc83c1449b55b30 (patch) | |
| tree | e17fb4c02be97a93bbc62a1036f296369156b66d /example/self/main.go | |
| parent | bc002bd8a767c5f305c3f8f21ec5c786ac5e0e37 (diff) | |
cmd: fix complete flags name
Diffstat (limited to 'example/self/main.go')
| -rw-r--r-- | example/self/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/example/self/main.go b/example/self/main.go index 068a0ac..ae4c2e4 100644 --- a/example/self/main.go +++ b/example/self/main.go @@ -28,7 +28,9 @@ func main() { // it is possible to set custom flags name // so when one will type 'self -h', he will see '-complete' to install the // completion and -uncomplete to uninstall it. - cmp.AddFlags(nil, "complete", "uncomplete") + cmp.CLI.InstallName = "complete" + cmp.CLI.UninstallName = "uncomplete" + cmp.AddFlags(nil) // parse the flags - both the program's flags and the completion flags flag.Parse() |
