diff --git a/src/CLI2.cpp b/src/CLI2.cpp index 67441f950..3fd286ecd 100644 --- a/src/CLI2.cpp +++ b/src/CLI2.cpp @@ -701,7 +701,7 @@ void CLI2::prepareFilter () } //////////////////////////////////////////////////////////////////////////////// -// Return all the MISCELLANEOUS args. +// Return all the MISCELLANEOUS args as strings. const std::vector CLI2::getWords () { std::vector words; @@ -721,6 +721,18 @@ const std::vector CLI2::getWords () return words; } +//////////////////////////////////////////////////////////////////////////////// +// Return all the MISCELLANEOUS args. +const std::vector CLI2::getMiscellaneous () +{ + std::vector misc; + for (const auto& a : _args) + if (a.hasTag ("MISCELLANEOUS")) + misc.push_back (a); + + return misc; +} + //////////////////////////////////////////////////////////////////////////////// // Search for 'value' in _entities category, return canonicalized value. bool CLI2::canonicalize ( diff --git a/src/CLI2.h b/src/CLI2.h index f24938cd0..6bada618a 100644 --- a/src/CLI2.h +++ b/src/CLI2.h @@ -78,6 +78,7 @@ public: void addContext (bool readable, bool writeable); void prepareFilter (); const std::vector getWords (); + const std::vector getMiscellaneous (); bool canonicalize (std::string&, const std::string&, const std::string&); std::string getBinary () const; std::string getCommand (bool canonical = true) const;