diff --git a/src/CLI.cpp b/src/CLI.cpp index d994a0851..249d3f16a 100644 --- a/src/CLI.cpp +++ b/src/CLI.cpp @@ -511,12 +511,13 @@ const std::string CLI::dump (const std::string& title /* = "CLI Parser" */) cons // be lexed from those that need to be left alone. // // Either the arg is appended to _original_args intact, or the lexemes are. -void CLI::addArg (const std::string& arg) +void CLI::addArg (const std::string& arg, bool first /* = false */) { // Do not lex these constructs. if (isTerminator (arg) || // -- isRCOverride (arg) || // rc: isConfigOverride (arg) || // rc.: + isCommand (arg) || // isTag (arg) || // [+-] isUUIDList (arg) || // ,[uuid ...] isUUID (arg) || // @@ -1877,6 +1878,13 @@ bool CLI::isConfigOverride (const std::string& raw) const return false; } +//////////////////////////////////////////////////////////////////////////////// +bool CLI::isCommand (const std::string& raw) const +{ + std::string canonical; + return canonicalize (canonical, "cmd", raw); +} + //////////////////////////////////////////////////////////////////////////////// bool CLI::isTag (const std::string& raw) const { diff --git a/src/CLI.h b/src/CLI.h index 83c965201..f653ca059 100644 --- a/src/CLI.h +++ b/src/CLI.h @@ -102,6 +102,7 @@ private: bool isTerminator (const std::string&) const; bool isRCOverride (const std::string&) const; bool isConfigOverride (const std::string&) const; + bool isCommand (const std::string&) const; bool isTag (const std::string&) const; bool isUUIDList (const std::string&) const; bool isUUID (const std::string&) const;