CLI2: Can now detect unwanted args in ::categorizeArgs

This commit is contained in:
Paul Beckingham
2015-09-06 01:56:59 -04:00
parent 3897c23c8d
commit 826d00d33f
10 changed files with 17 additions and 0 deletions

View File

@@ -948,6 +948,14 @@ void CLI2::categorizeArgs ()
a.tag ("FILTER");
changes = true;
}
else if (cmd &&
! cmd->accepts_filter () &&
! cmd->accepts_modifications () &&
! cmd->accepts_miscellaneous ())
{
throw format (STRING_PARSER_UNEXPECTED_ARG, command, a.attribute ("raw"));
}
}
if (changes &&