diff --git a/src/CLI2.cpp b/src/CLI2.cpp index ca8ec50c9..5fdcdd9b6 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -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 && diff --git a/src/l10n/deu-DEU.h b/src/l10n/deu-DEU.h index f10a97cf1..59b81266b 100644 --- a/src/l10n/deu-DEU.h +++ b/src/l10n/deu-DEU.h @@ -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 // diff --git a/src/l10n/eng-USA.h b/src/l10n/eng-USA.h index 55f69d10e..73e6b672d 100644 --- a/src/l10n/eng-USA.h +++ b/src/l10n/eng-USA.h @@ -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 // diff --git a/src/l10n/epo-RUS.h b/src/l10n/epo-RUS.h index 141b3dbcf..fa5f23bd9 100644 --- a/src/l10n/epo-RUS.h +++ b/src/l10n/epo-RUS.h @@ -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 // diff --git a/src/l10n/esp-ESP.h b/src/l10n/esp-ESP.h index 47fd233dc..e6f754f5f 100644 --- a/src/l10n/esp-ESP.h +++ b/src/l10n/esp-ESP.h @@ -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 // diff --git a/src/l10n/fra-FRA.h b/src/l10n/fra-FRA.h index a7445229d..5a2ce6928 100644 --- a/src/l10n/fra-FRA.h +++ b/src/l10n/fra-FRA.h @@ -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 // diff --git a/src/l10n/ita-ITA.h b/src/l10n/ita-ITA.h index 84cb63226..f51ec2c34 100644 --- a/src/l10n/ita-ITA.h +++ b/src/l10n/ita-ITA.h @@ -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 // diff --git a/src/l10n/jpn-JPN.h b/src/l10n/jpn-JPN.h index 766da56d4..2ff8f8e6d 100644 --- a/src/l10n/jpn-JPN.h +++ b/src/l10n/jpn-JPN.h @@ -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 // diff --git a/src/l10n/pol-POL.h b/src/l10n/pol-POL.h index 625c8f6ff..f002adef0 100644 --- a/src/l10n/pol-POL.h +++ b/src/l10n/pol-POL.h @@ -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 // diff --git a/src/l10n/por-PRT.h b/src/l10n/por-PRT.h index 1a752dffd..2237e6715 100644 --- a/src/l10n/por-PRT.h +++ b/src/l10n/por-PRT.h @@ -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 //