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 &&

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Fehler: Nicht erkannter Attribut-Operator '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Verwende alternative .taskrc-Datei {1}"
#define STRING_PARSER_ALTERNATE_DATA "Verwende alternative data.location {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Error: unrecognized attribute modifier '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Using alternate .taskrc file {1}"
#define STRING_PARSER_ALTERNATE_DATA "Using alternate data.location {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Eraro: nekonata atributa modifanto '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Uzanta alterna .taskrc-dosiero {1}"
#define STRING_PARSER_ALTERNATE_DATA "Uzanta alterna data.location {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Error: modificador de atributo no reconocido '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Usando el archivo .taskrc alternativo {1}"
#define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Erreur : attribut de modification non reconnu '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Utilise un fichier .taskrc alternatif : {1}"
#define STRING_PARSER_ALTERNATE_DATA "Utilise une data.location alternative : {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Errore: modificatore di attributo non riconosciuto '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Uso del file .taskrc alternativo {1}"
#define STRING_PARSER_ALTERNATE_DATA "Uso di data.location alternativa {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "エラー: 不明な属性変更子 '{1}'."
#define STRING_PARSER_ALTERNATE_RC "代替の .taskrc ファイル {1} を使用"
#define STRING_PARSER_ALTERNATE_DATA "代替の data.location {1} を使用"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Błąd: nierozpoznany atrybut '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Wczytanie alternatywnego pliku .taskrc {1}"
#define STRING_PARSER_ALTERNATE_DATA "Alternatywne data.location {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//

View File

@@ -107,6 +107,7 @@
#define STRING_PARSER_UNKNOWN_ATTMOD "Erro: modificador de atributo não reconhecido '{1}'."
#define STRING_PARSER_ALTERNATE_RC "Usando o ficheiro .taskrc alternativo {1}"
#define STRING_PARSER_ALTERNATE_DATA "Usando data.location alternativa {1}"
#define STRING_PARSER_UNEXPECTED_ARG "The '{1}' command does not allow '{2}'."
// Variant
//