diff --git a/AUTHORS b/AUTHORS index 736d0a6fc..b13f74bad 100644 --- a/AUTHORS +++ b/AUTHORS @@ -205,3 +205,4 @@ suggestions: jck Michele Vetturi Jeremiah Marks + Profpatsch diff --git a/ChangeLog b/ChangeLog index 08f56d116..c66a1f8bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,14 +9,13 @@ Features - TW-255 'Mask' instead of 'iMask' shown in info report (thanks to Benjamin Weber) - TW-261 Easy to create "not deletable" task (thanks to Jan Kunder). -- TW-278 Cygwin throws warnings building mk_wcwidth() in wcwidth6.c. - TW-1255 New testing framework (thanks to Renato Alves). - TW-1258 Portuguese Localization (thanks to Renato Alves). - TW-1260 New virtual tags YESTERDAY, TOMORROW. - TW-1261 Migrate test bug.360.t to new unit testing framework (thanks to Renato Alves). - TW-1274 Map 'modification' attribute to 'modified' (thanks to jck). -- TW-1302 CmdShow.cpp:244: bad length in substr ? (thanks to David Binderman). +- TW-1301 Virtual tag +PENDING (thanks to Profpatsch). - Removed deprecated 'echo.command' setting, in favor of the 'header' and 'affected' verbosity tokens. - Removed deprecated 'edit.verbose' setting, in favor of the 'edit' verbosity @@ -35,6 +34,7 @@ Bugs - TD-42 Cannot compile taskd - GNUTLS_VERSION undefined in diag.cpp (thanks to Michele Vetturi). - TD-45 Fix preprocessor define (thanks to Jochen Sprickerhof). +- TW-278 Cygwin throws warnings building mk_wcwidth() in wcwidth6.c. - TW-1254 Calc command can segfault on negative numbers (thanks to Renato Alves). - TW-1282 incorrect URLs in man task-sync (thanks to Jeremiah Marks). @@ -44,6 +44,7 @@ Bugs Wilk). - TW-1296 make test/run_all exit with non-zero code if a test fail (thanks to Jakub Wilk). +- TW-1302 CmdShow.cpp:244: bad length in substr ? (thanks to David Binderman). - #1511 sync init crashes if client certification file is empty or invalid (thanks to Marton Suranyi). - #1508 Show command highlight configuration (thanks to Nicolas Appriou). diff --git a/NEWS b/NEWS index 197b9f9d5..262440ccf 100644 --- a/NEWS +++ b/NEWS @@ -5,7 +5,7 @@ New Features in taskwarrior 2.4.0 - Removed deprecated commands 'push', 'pull' and 'merge'. - Portuguese (por-PRT) localization. - Better handling for deletion of recurring tasks. - - New virtual tags: YESTERDAY, TOMORROW, READY. + - New virtual tags: YESTERDAY, TOMORROW, READY, PENDING, COMPLETED, DELETED. New commands in taskwarrior 2.4.0 diff --git a/doc/man/task.1.in b/doc/man/task.1.in index c7840819d..42c26ea09 100644 --- a/doc/man/task.1.in +++ b/doc/man/task.1.in @@ -588,6 +588,9 @@ are: UNTIL Matches if the task expires WAITING Matches if the task is waiting ANNOTATED Matches if the task has annotations + PENDING Matches if the task has pending status + COMPLETED Matches if the task has completed status + DELETED Matches if the task has deleted status You can use +BLOCKED to filter blocked tasks, or -BLOCKED for unblocked tasks. Similarly, -BLOCKED is equivalent to +UNBLOCKED. diff --git a/src/Task.cpp b/src/Task.cpp index 27149e258..8bee7d291 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1169,6 +1169,9 @@ bool Task::hasTag (const std::string& tag) const if (tag == "WAITING") return has ("wait"); if (tag == "ANNOTATED") return hasAnnotations (); if (tag == "PARENT") return has ("mask"); + if (tag == "PENDING") return get ("status") == "pending"; + if (tag == "COMPLETED") return get ("status") == "completed"; + if (tag == "DELETED") return get ("status") == "deleted"; // Concrete tags. std::vector tags;