summaryrefslogtreecommitdiff
path: root/example/self/main.go
diff options
context:
space:
mode:
authorEyal Posener <[email protected]>2017-05-23 07:45:28 +0300
committerGitHub <[email protected]>2017-05-23 07:45:28 +0300
commit3e6cff0740a53c8e9d6106ad29a4fd1bc4536c99 (patch)
tree4fd293605f8e917ba9848c39a10f37287d65ef2a /example/self/main.go
parentbae3fd94da57ecb9d04524c0b34895df0f86a1d1 (diff)
parent17b9aed67cff5e3ed6032e82785d774eece5c7a1 (diff)
Merge pull request #37 from posener/fixes
Fixes
Diffstat (limited to 'example/self/main.go')
-rw-r--r--example/self/main.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/example/self/main.go b/example/self/main.go
index ae4c2e4..9479e64 100644
--- a/example/self/main.go
+++ b/example/self/main.go
@@ -19,7 +19,7 @@ func main() {
// create the complete command
cmp := complete.New(
"self",
- complete.Command{Flags: complete.Flags{"name": complete.PredictAnything}},
+ complete.Command{Flags: complete.Flags{"-name": complete.PredictAnything}},
)
// AddFlags adds the completion flags to the program flags,
@@ -39,7 +39,7 @@ func main() {
// and ran as a completion script or handled a flag that passed
// as argument, the Run method will return true,
// in that case, our program have nothing to do and should return.
- if cmp.Run() {
+ if cmp.Complete() {
return
}