CLI: If a command is not found, look instead for an extension

This commit is contained in:
Paul Beckingham 2016-04-10 00:26:19 -04:00
parent 60779c6a37
commit 1773db02e1
2 changed files with 5 additions and 0 deletions

View file

@ -292,6 +292,10 @@ std::string CLI::getCommand () const
if (a.hasTag ("CMD"))
return a.attribute ("canonical");
for (auto& a : _args)
if (a.hasTag ("EXT"))
return a.attribute ("canonical");
return "";
}

View file

@ -210,6 +210,7 @@ int dispatchCommand (
else if (command == "tags") status = CmdTags ( rules, database );
else if (command == "track") status = CmdTrack (cli, rules, database );
else if (command == "undo") status = CmdUndo ( );
else status = CmdReport (cli, rules, database, extensions);
}
else
{