Feature #571 - Special tag feedback
- The verbosity token 'special' now controls whether the feedback is provided when special tags are added to a task. - Added new 'special' verbosity token documentation to man page. - Added missing 'next' special tag to man page. - Added new localized strings for describing special tags.
This commit is contained in:
@@ -340,4 +340,29 @@ void feedback_affected (const std::string& effect, const Task& task)
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Implements feedback when adding special tags to a task.
|
||||
void feedback_special_tags (const Task& task, const std::string& tag)
|
||||
{
|
||||
if (context.verbose ("special"))
|
||||
{
|
||||
std::string msg;
|
||||
std::string explanation;
|
||||
if (tag == "nocolor") msg = STRING_FEEDBACK_TAG_NOCOLOR;
|
||||
else if (tag == "nonag") msg = STRING_FEEDBACK_TAG_NONAG;
|
||||
else if (tag == "nocal") msg = STRING_FEEDBACK_TAG_NOCAL;
|
||||
else if (tag == "next") msg = STRING_FEEDBACK_TAG_NEXT;
|
||||
|
||||
if (msg.length ())
|
||||
{
|
||||
if (task.id)
|
||||
std::cout << format (msg, task.id)
|
||||
<< "\n";
|
||||
else
|
||||
std::cout << format (msg, task.get ("uuid"))
|
||||
<< "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Reference in New Issue
Block a user