- Thanks to Adrien Lemaire.

This commit is contained in:
Paul Beckingham 2019-08-11 14:01:22 -04:00
parent 82ed5d35b7
commit 04bc1a7998
5 changed files with 14 additions and 4 deletions

View file

@ -336,3 +336,4 @@ suggestions:
Martin F. Krafft Martin F. Krafft
tom-doerr tom-doerr
ad-si ad-si
Adrien Lemaire

View file

@ -109,6 +109,8 @@
Thanks to Janik Rabe Thanks to Janik Rabe
- #2132 JSON encode/decode string UDAs - #2132 JSON encode/decode string UDAs
Thanks to Chad Phillips Thanks to Chad Phillips
- #2176 How to get the full list of tags ?
Thanks to Adrien Lemaire
- Added 'juhannus' as a synonym for 'midsommarafton' - Added 'juhannus' as a synonym for 'midsommarafton'
Thanks to Lynoure Braakman Thanks to Lynoure Braakman
- Deprecated the 'DUETODAY' virtual tag, which is a synonym for the 'TODAY' - Deprecated the 'DUETODAY' virtual tag, which is a synonym for the 'TODAY'

View file

@ -1255,6 +1255,7 @@ 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.
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;

View file

@ -307,11 +307,15 @@ int CmdInfo::execute (std::string& output)
if (task.hasTag ("DELETED")) virtualTags += "DELETED "; if (task.hasTag ("DELETED")) virtualTags += "DELETED ";
if (task.hasTag ("DUE")) virtualTags += "DUE "; if (task.hasTag ("DUE")) virtualTags += "DUE ";
if (task.hasTag ("DUETODAY")) virtualTags += "DUETODAY "; if (task.hasTag ("DUETODAY")) virtualTags += "DUETODAY ";
if (task.hasTag ("LATEST")) virtualTags += "LATEST ";
if (task.hasTag ("MONTH")) virtualTags += "MONTH "; if (task.hasTag ("MONTH")) virtualTags += "MONTH ";
if (task.hasTag ("ORPHAN")) virtualTags += "ORPHAN "; if (task.hasTag ("ORPHAN")) virtualTags += "ORPHAN ";
if (task.hasTag ("OVERDUE")) virtualTags += "OVERDUE "; if (task.hasTag ("OVERDUE")) virtualTags += "OVERDUE ";
if (task.hasTag ("PARENT")) virtualTags += "PARENT "; if (task.hasTag ("PARENT")) virtualTags += "PARENT ";
if (task.hasTag ("PENDING")) virtualTags += "PENDING "; 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 ("READY")) virtualTags += "READY ";
if (task.hasTag ("SCHEDULED")) virtualTags += "SCHEDULED "; if (task.hasTag ("SCHEDULED")) virtualTags += "SCHEDULED ";
if (task.hasTag ("TAGGED")) virtualTags += "TAGGED "; 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 ("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 (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. // If you update the above list, update src/commands/CmdInfo.cpp and src/commands/CmdTags.cpp as well.
row = view.addRow (); row = view.addRow ();

View file

@ -189,11 +189,15 @@ int CmdCompletionTags::execute (std::string& output)
unique["DELETED"] = 0; unique["DELETED"] = 0;
unique["DUE"] = 0; unique["DUE"] = 0;
unique["DUETODAY"] = 0; unique["DUETODAY"] = 0;
unique["LATEST"] = 0;
unique["MONTH"] = 0; unique["MONTH"] = 0;
unique["ORPHAN"] = 0; unique["ORPHAN"] = 0;
unique["OVERDUE"] = 0; unique["OVERDUE"] = 0;
unique["PARENT"] = 0; unique["PARENT"] = 0;
unique["PENDING"] = 0; unique["PENDING"] = 0;
unique["PRIORITY"] = 0;
unique["PROJECT"] = 0;
unique["QUARTER"] = 0;
unique["READY"] = 0; unique["READY"] = 0;
unique["SCHEDULED"] = 0; unique["SCHEDULED"] = 0;
unique["TAGGED"] = 0; unique["TAGGED"] = 0;
@ -206,7 +210,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)