From 1773db02e1b3e56e4cd44f8c9c23b883e06a7a27 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 10 Apr 2016 00:26:19 -0400 Subject: [PATCH] CLI: If a command is not found, look instead for an extension --- src/CLI.cpp | 4 ++++ src/init.cpp | 1 + 2 files changed, 5 insertions(+) diff --git a/src/CLI.cpp b/src/CLI.cpp index 1769f113..c7a6dfe7 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -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 ""; } diff --git a/src/init.cpp b/src/init.cpp index ab686087..faf087fe 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -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 {