diff --git a/custom_completions.go b/custom_completions.go index 951982dbf..f68880b5f 100644 --- a/custom_completions.go +++ b/custom_completions.go @@ -302,7 +302,7 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi if len(finalArgs) == 0 && !foundLocalNonPersistentFlag { // We only complete sub-commands if: // - there are no arguments on the command-line and - // - there are no local, non-persistent flag on the command-line or TraverseChildren is true + // - there are no local, non-persistent flags on the command-line or TraverseChildren is true for _, subCmd := range finalCmd.Commands() { if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand { if strings.HasPrefix(subCmd.Name(), toComplete) {