mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Feature - Special tags
- Implemented the 'nonag' tag that prevents nag messages for a task.
This commit is contained in:
parent
2c5f590fed
commit
64c643920f
2 changed files with 9 additions and 0 deletions
|
@ -10,6 +10,8 @@
|
||||||
+ Added feature #341 that makes explicit references to the task and taskrc
|
+ Added feature #341 that makes explicit references to the task and taskrc
|
||||||
man pages, both in the auto-generated .taskrc file and the version command
|
man pages, both in the auto-generated .taskrc file and the version command
|
||||||
output (thanks to Cory Donnelly).
|
output (thanks to Cory Donnelly).
|
||||||
|
+ Added special 'nonag' tag that suppresses nag messages for a task.
|
||||||
|
+ Added special 'nocolor' tag that suppresses colorization rules for a task.
|
||||||
+ Fixed bug that showed a calendar for the year 2037 when 'task calendar due'
|
+ Fixed bug that showed a calendar for the year 2037 when 'task calendar due'
|
||||||
was run, and there are no tasks with due dates.
|
was run, and there are no tasks with due dates.
|
||||||
+ Fixed bug #316 which caused the timesheet report to display an oddly sorted
|
+ Fixed bug #316 which caused the timesheet report to display an oddly sorted
|
||||||
|
|
|
@ -399,8 +399,15 @@ int getDueState (const std::string& due)
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Returns a Boolean indicator as to whether a nag message was generated, so
|
||||||
|
// that commands can control the number of nag messages displayed (ie one is
|
||||||
|
// enough).
|
||||||
bool nag (Task& task)
|
bool nag (Task& task)
|
||||||
{
|
{
|
||||||
|
// Special tag overrides nagging.
|
||||||
|
if (task.hasTag ("nonag"))
|
||||||
|
return false;
|
||||||
|
|
||||||
std::string nagMessage = context.config.get ("nag", "");
|
std::string nagMessage = context.config.get ("nag", "");
|
||||||
if (nagMessage != "")
|
if (nagMessage != "")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue