--- a/src/CLIParser.h Mon Nov 11 14:42:13 2019 +0100
+++ b/src/CLIParser.h Sat Jan 11 00:56:51 2020 +0100
@@ -51,8 +51,7 @@
static const string_t OPTION_FILE;
static const string_t OPTION_XATTR;
- static const string_t OPTION_HASH;
- static const string_t OPTION_SCRIPT;
+ static const string_t OPTION_EXEC;
static const string_t OPTION_AS;
static const string_t OPTION_OPTION;
static const string_t OPTION_RELATION;
@@ -69,7 +68,7 @@
for (int i = 0; i < arguments.size();) {
string_t option = readNext(arguments, i);
- if (option == CLIParser::OPTION_FILE || option == CLIParser::OPTION_XATTR || option == CLIParser::OPTION_HASH || option == CLIParser::OPTION_SCRIPT) {
+ if (option == CLIParser::OPTION_FILE || option == CLIParser::OPTION_XATTR || option == CLIParser::OPTION_EXEC) {
addField(c, currentGroup, currentName, currentAliases, currentOptions); // previous field
currentGroup = option.substr(2); // cut off --
currentName = readNext(arguments, i);
@@ -105,6 +104,8 @@
// c.fields.push_back(RequestedField(RequestedField::GROUP_XATTR, L"user.xdg.origin.url"));
}
+ for (int i = 0; i < c.fields.size(); i++) c.fields[i].id = i;
+
return c;
}
@@ -114,8 +115,7 @@
const string_t CLIParser::OPTION_FILE = L"--" + RequestedField::GROUP_FILE;
const string_t CLIParser::OPTION_XATTR = L"--" + RequestedField::GROUP_XATTR;
-const string_t CLIParser::OPTION_HASH = L"--" + RequestedField::GROUP_HASH;
-const string_t CLIParser::OPTION_SCRIPT = L"--" + RequestedField::GROUP_SCRIPT;
+const string_t CLIParser::OPTION_EXEC = L"--" + RequestedField::GROUP_EXEC;
const string_t CLIParser::OPTION_AS = L"--as";
const string_t CLIParser::OPTION_OPTION = L"--option";
const string_t CLIParser::OPTION_RELATION = L"--relation";