From 5ba73666ab38b2d2524b42bf3dc83c1449b55b30 Mon Sep 17 00:00:00 2001 From: Eyal Posener Date: Sat, 20 May 2017 22:15:37 +0300 Subject: cmd: fix complete flags name --- example/self/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'example/self/main.go') 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() -- cgit v1.2.3