mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-26 15:47:19 +02:00
CmdTags: Update pointers to task enumeration lists
This commit is contained in:
parent
8610268cd9
commit
dbf641988e
3 changed files with 6 additions and 2 deletions
|
@ -1347,6 +1347,9 @@ bool Task::hasTag (const std::string& tag) const
|
||||||
// Note: This list must match that in ::feedback_reserved_tags.
|
// Note: This list must match that in ::feedback_reserved_tags.
|
||||||
if (isupper (tag[0]))
|
if (isupper (tag[0]))
|
||||||
{
|
{
|
||||||
|
// NOTE: This list should be kept synchronized with:
|
||||||
|
// * the list in CmdTags.cpp for the _tags command.
|
||||||
|
// * the list in CmdInfo.cpp for the info command.
|
||||||
if (tag == "BLOCKED") return is_blocked;
|
if (tag == "BLOCKED") return is_blocked;
|
||||||
if (tag == "UNBLOCKED") return !is_blocked;
|
if (tag == "UNBLOCKED") return !is_blocked;
|
||||||
if (tag == "BLOCKING") return is_blocking;
|
if (tag == "BLOCKING") return is_blocking;
|
||||||
|
|
|
@ -357,7 +357,7 @@ int CmdInfo::execute (std::string& output)
|
||||||
if (task.hasTag ("WEEK")) virtualTags += "WEEK ";
|
if (task.hasTag ("WEEK")) virtualTags += "WEEK ";
|
||||||
if (task.hasTag ("YEAR")) virtualTags += "YEAR ";
|
if (task.hasTag ("YEAR")) virtualTags += "YEAR ";
|
||||||
if (task.hasTag ("YESTERDAY")) virtualTags += "YESTERDAY ";
|
if (task.hasTag ("YESTERDAY")) virtualTags += "YESTERDAY ";
|
||||||
// If you update the above list, update src/commands/CmdInfo.cpp and src/commands/CmdTags.cpp as well.
|
// If you update the above list, update src/Task.cpp and src/commands/CmdTags.cpp as well.
|
||||||
|
|
||||||
row = view.addRow ();
|
row = view.addRow ();
|
||||||
view.set (row, 0, "Virtual tags");
|
view.set (row, 0, "Virtual tags");
|
||||||
|
|
|
@ -212,7 +212,8 @@ int CmdCompletionTags::execute (std::string& output)
|
||||||
unique["WEEK"] = 0;
|
unique["WEEK"] = 0;
|
||||||
unique["YEAR"] = 0;
|
unique["YEAR"] = 0;
|
||||||
unique["YESTERDAY"] = 0;
|
unique["YESTERDAY"] = 0;
|
||||||
// If you update the above list, update src/commands/CmdInfo.cpp and src/commands/CmdTags.cpp as well.
|
|
||||||
|
// If you update the above list, update src/commands/CmdInfo.cpp and src/Task.cpp as well.
|
||||||
|
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
for (auto& it : unique)
|
for (auto& it : unique)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue