diff --git a/AUTHORS b/AUTHORS index d72a80873..a04907448 100644 --- a/AUTHORS +++ b/AUTHORS @@ -336,3 +336,4 @@ suggestions: Martin F. Krafft tom-doerr ad-si + Adrien Lemaire diff --git a/ChangeLog b/ChangeLog index 2193146aa..c91784531 100644 --- a/ChangeLog +++ b/ChangeLog @@ -109,6 +109,8 @@ Thanks to Janik Rabe - #2132 JSON encode/decode string UDAs Thanks to Chad Phillips +- #2176 How to get the full list of tags ? + Thanks to Adrien Lemaire - Added 'juhannus' as a synonym for 'midsommarafton' Thanks to Lynoure Braakman - Deprecated the 'DUETODAY' virtual tag, which is a synonym for the 'TODAY' diff --git a/src/Task.cpp b/src/Task.cpp index 98f0b3dae..84c6c41e1 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1255,6 +1255,7 @@ bool Task::hasTag (const std::string& tag) const // Note: This list must match that in ::feedback_reserved_tags. if (isupper (tag[0])) { + // NOTE: This list should be kept synchronized with the list in CmdTags.cpp for the _tags command. if (tag == "BLOCKED") return is_blocked; if (tag == "UNBLOCKED") return !is_blocked; if (tag == "BLOCKING") return is_blocking; diff --git a/src/commands/CmdInfo.cpp b/src/commands/CmdInfo.cpp index 8d4633342..d28c5395f 100644 --- a/src/commands/CmdInfo.cpp +++ b/src/commands/CmdInfo.cpp @@ -307,11 +307,15 @@ int CmdInfo::execute (std::string& output) if (task.hasTag ("DELETED")) virtualTags += "DELETED "; if (task.hasTag ("DUE")) virtualTags += "DUE "; if (task.hasTag ("DUETODAY")) virtualTags += "DUETODAY "; + if (task.hasTag ("LATEST")) virtualTags += "LATEST "; if (task.hasTag ("MONTH")) virtualTags += "MONTH "; if (task.hasTag ("ORPHAN")) virtualTags += "ORPHAN "; if (task.hasTag ("OVERDUE")) virtualTags += "OVERDUE "; if (task.hasTag ("PARENT")) virtualTags += "PARENT "; if (task.hasTag ("PENDING")) virtualTags += "PENDING "; + if (task.hasTag ("PRIORITY")) virtualTags += "PRIORITY "; + if (task.hasTag ("PROJECT")) virtualTags += "PROJECT "; + if (task.hasTag ("QUARTER")) virtualTags += "QUARTER "; if (task.hasTag ("READY")) virtualTags += "READY "; if (task.hasTag ("SCHEDULED")) virtualTags += "SCHEDULED "; if (task.hasTag ("TAGGED")) virtualTags += "TAGGED "; @@ -324,9 +328,6 @@ int CmdInfo::execute (std::string& output) if (task.hasTag ("WEEK")) virtualTags += "WEEK "; if (task.hasTag ("YEAR")) virtualTags += "YEAR "; if (task.hasTag ("YESTERDAY")) virtualTags += "YESTERDAY "; - if (task.hasTag ("LATEST")) virtualTags += "LATEST "; - if (task.hasTag ("PROJECT")) virtualTags += "PROJECT "; - if (task.hasTag ("PRIORITY")) virtualTags += "PRIORITY "; // If you update the above list, update src/commands/CmdInfo.cpp and src/commands/CmdTags.cpp as well. row = view.addRow (); diff --git a/src/commands/CmdTags.cpp b/src/commands/CmdTags.cpp index c5d64ca80..110257194 100644 --- a/src/commands/CmdTags.cpp +++ b/src/commands/CmdTags.cpp @@ -189,11 +189,15 @@ int CmdCompletionTags::execute (std::string& output) unique["DELETED"] = 0; unique["DUE"] = 0; unique["DUETODAY"] = 0; + unique["LATEST"] = 0; unique["MONTH"] = 0; unique["ORPHAN"] = 0; unique["OVERDUE"] = 0; unique["PARENT"] = 0; unique["PENDING"] = 0; + unique["PRIORITY"] = 0; + unique["PROJECT"] = 0; + unique["QUARTER"] = 0; unique["READY"] = 0; unique["SCHEDULED"] = 0; unique["TAGGED"] = 0; @@ -206,7 +210,8 @@ int CmdCompletionTags::execute (std::string& output) unique["WEEK"] = 0; unique["YEAR"] = 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; for (auto& it : unique)