summaryrefslogtreecommitdiff
path: root/complete.go
diff options
context:
space:
mode:
Diffstat (limited to 'complete.go')
-rw-r--r--complete.go16
1 files changed, 7 insertions, 9 deletions
diff --git a/complete.go b/complete.go
index 0fb29c9..aba6a33 100644
--- a/complete.go
+++ b/complete.go
@@ -40,16 +40,14 @@ func ParseFlagsArgv(dest ...interface{}) (*Parser, error) {
*/
return p, err
}
- if argvpb.PB.ErrCounter < 5 {
- if argvpb.Len() == 0 {
- // user didn't enter any text and is hitting <tab> after the command itself
- p.WriteHelp(argvpb.Stderr)
- if p.match != nil {
- // calls back to the application. this allows the application to provide autocomplete matches
- p.match()
- }
- return p, errors.New("WriteHelp() worked")
+ if argvpb.Len() == 0 {
+ // user didn't enter any text and is hitting <tab> after the command itself
+ p.WriteHelp(argvpb.Stderr)
+ if p.match != nil {
+ // calls back to the application. this allows the application to provide autocomplete matches
+ p.match()
}
+ return p, errors.New("WriteHelp() worked")
}
if argvpb.PB.GetCmd() == "" {
// user is trying to get help for a subcommand