mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-07 21:07:20 +02:00
CLI2: Generalize _context_filter_added latch name
This commit is contained in:
parent
510786ff91
commit
a2c3d224d3
2 changed files with 4 additions and 4 deletions
|
@ -564,7 +564,7 @@ void CLI2::addFilter (const std::string& arg)
|
||||||
void CLI2::addContextFilter ()
|
void CLI2::addContextFilter ()
|
||||||
{
|
{
|
||||||
// Recursion block.
|
// Recursion block.
|
||||||
if (_context_filter_added)
|
if (_context_added)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Detect if any context is set, and bail out if not
|
// Detect if any context is set, and bail out if not
|
||||||
|
@ -595,7 +595,7 @@ void CLI2::addContextFilter ()
|
||||||
Context::getContext ().debug ("Context '" + contextName + "' not defined.");
|
Context::getContext ().debug ("Context '" + contextName + "' not defined.");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_context_filter_added = true;
|
_context_added = true;
|
||||||
addFilter (contextFilter);
|
addFilter (contextFilter);
|
||||||
if (Context::getContext ().verbose ("context"))
|
if (Context::getContext ().verbose ("context"))
|
||||||
Context::getContext ().footnote (format ("Context '{1}' set. Use 'task context none' to remove.", contextName));
|
Context::getContext ().footnote (format ("Context '{1}' set. Use 'task context none' to remove.", contextName));
|
||||||
|
@ -610,7 +610,7 @@ void CLI2::prepareFilter ()
|
||||||
// Clear and re-populate.
|
// Clear and re-populate.
|
||||||
_id_ranges.clear ();
|
_id_ranges.clear ();
|
||||||
_uuid_list.clear ();
|
_uuid_list.clear ();
|
||||||
_context_filter_added = false;
|
_context_added = false;
|
||||||
|
|
||||||
// Remove all the syntactic sugar for FILTERs.
|
// Remove all the syntactic sugar for FILTERs.
|
||||||
lexFilterArgs ();
|
lexFilterArgs ();
|
||||||
|
|
|
@ -113,7 +113,7 @@ public:
|
||||||
|
|
||||||
std::vector <std::pair <std::string, std::string>> _id_ranges {};
|
std::vector <std::pair <std::string, std::string>> _id_ranges {};
|
||||||
std::vector <std::string> _uuid_list {};
|
std::vector <std::string> _uuid_list {};
|
||||||
bool _context_filter_added {false};
|
bool _context_added {false};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue