summaryrefslogtreecommitdiff
path: root/example/self/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'example/self/main.go')
-rw-r--r--example/self/main.go4
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()