diff options
| author | Eyal Posener <[email protected]> | 2017-05-23 07:33:38 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-23 07:33:38 +0300 |
| commit | 3636c19b38fba5bf6a11469227d68c1f6189c7f7 (patch) | |
| tree | 6f3ecbe5849ece8dca926543e0b770481255ff73 /example/self/main.go | |
| parent | 1a4c871bd8a0eb5774646fa3b60ed0be42d65689 (diff) | |
Fix example/self
Fixes #34
Diffstat (limited to 'example/self/main.go')
| -rw-r--r-- | example/self/main.go | 4 |
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 } |
