diff --git a/src/Filter.cpp b/src/Filter.cpp index 6e93d43a8..cd7476487 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -218,6 +218,16 @@ bool Filter::hasModifications () return false; } +//////////////////////////////////////////////////////////////////////////////// +bool Filter::hasMiscellaneous () +{ + for (auto& a : context.cli2._args) + if (a.hasTag ("MISCELLANEOUS")) + return true; + + return false; +} + //////////////////////////////////////////////////////////////////////////////// // If the filter contains no 'or', 'xor' or 'not' operators, and only includes // status values 'pending', 'waiting' or 'recurring', then the filter is diff --git a/src/Filter.h b/src/Filter.h index 096d06794..d918fe5fa 100644 --- a/src/Filter.h +++ b/src/Filter.h @@ -44,6 +44,7 @@ public: void subset (std::vector &); bool hasFilter (); bool hasModifications (); + bool hasMiscellaneous (); bool pendingOnly (); void safety (); void disableSafety ();