summaryrefslogtreecommitdiff
path: root/example/self/main.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-20 22:53:01 +0300
committerGitHub <[email protected]>2017-05-20 22:53:01 +0300
commiteade2bb23312955168514b0f62e7e8faf5748cef (patch)
tree4dfe7de2d7eab51b10da1f27d5af3bf1be572741 /example/self/main.go
parentbc002bd8a767c5f305c3f8f21ec5c786ac5e0e37 (diff)
parent14dcbd6b21157407d501d08d8d2ee16e1027b564 (diff)
Merge pull request #32 from posener/flags
Flags
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()