completion should not implement the Commander interface
diff --git a/completion.go b/completion.go
index fea0e3a..76a2808 100644
--- a/completion.go
+++ b/completion.go
@@ -275,7 +275,7 @@
return ret
}
-func (c *completion) Execute(args []string) error {
+func (c *completion) execute(args []string) {
ret := c.complete(args)
if c.ShowDescriptions && len(ret) > 1 {
@@ -301,6 +301,4 @@
fmt.Println(v.Item)
}
}
-
- return nil
}
diff --git a/parser.go b/parser.go
index 7bc991b..0ad010d 100644
--- a/parser.go
+++ b/parser.go
@@ -151,9 +151,9 @@
if len(os.Getenv("GO_FLAGS_COMPLETION")) != 0 {
comp := &completion{parser: p}
- reterr := comp.Execute(args)
+ comp.execute(args)
- return args, p.printError(reterr)
+ return nil, nil
}
s := &parseState{