- Tightened restriction in ::categorize.
This commit is contained in:
Paul Beckingham
2014-10-24 22:00:36 -04:00
parent 5add257d8b
commit dbefd7d6fe

View File

@@ -503,21 +503,21 @@ void CLI::categorize ()
a->tag ("ORIGINAL"); a->tag ("ORIGINAL");
a->tag ("TERMINATOR"); a->tag ("TERMINATOR");
terminated = true; terminated = true;
continue;
} }
else if (terminated) if (terminated)
{ {
a->unTagAll (); a->unTagAll ();
a->tag ("ORIGINAL"); a->tag ("ORIGINAL");
a->tag ("TERMINATED"); a->tag ("TERMINATED");
a->tag ("WORD"); a->tag ("WORD");
// TODO This prevents MODIFICATION tagging below.
continue;
} }
std::string canonical; std::string canonical;
if (canonicalize (canonical, "cmd", raw)) if (! terminated &&
! foundCommand &&
canonicalize (canonical, "cmd", raw))
{ {
readOnly = ! exactMatch ("writecmd", canonical); readOnly = ! exactMatch ("writecmd", canonical);
@@ -526,8 +526,9 @@ void CLI::categorize ()
a->attribute ("name", canonical); a->attribute ("name", canonical);
foundCommand = true; foundCommand = true;
} }
else if (a->hasTag ("BINARY") || else if (a->hasTag ("TERMINATOR") ||
a->hasTag ("CONFIG") || a->hasTag ("BINARY") ||
a->hasTag ("CONFIG") ||
a->hasTag ("RC")) a->hasTag ("RC"))
{ {
// NOP // NOP