Adds a missing check that resulted in partial token
matches being accepted as exact matches when calculating
input completions.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
for (ALL_LIST_ELEMENTS_RO (current,node,gn))
{
struct cmd_token *token = gn->data;
+ enum match_type minmatch = min_match_level (token->type);
#ifdef TRACE_MATCHER
fprintf (stdout, "\"%s\" matches \"%s\" (%d) ? ", input_token, token->text, token->type);
#endif
listnode_add (next, gn);
break;
}
+ if (minmatch > partly_match)
+ break;
case exact_match:
#ifdef TRACE_MATCHER
fprintf (stdout, "exact_match\n");