mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CmdNews: Filter out non-major news updates if displaying shortened summary
This commit is contained in:
parent
1935cd7e2d
commit
4f1af72235
1 changed files with 7 additions and 0 deletions
|
@ -154,6 +154,13 @@ int CmdNews::execute (std::string& output)
|
|||
signal (SIGINT, SIG_DFL);
|
||||
bool full_summary = matches.size () == 1 && matches[0] == "full" ? true : false;
|
||||
|
||||
// Remove non-major items if displaying a non-full (abbreviated) summary
|
||||
if (! full_summary)
|
||||
items.erase (
|
||||
std::remove_if (items.begin (), items.end (), [](const NewsItem& n){return n._major == false;}),
|
||||
items.end ()
|
||||
);
|
||||
|
||||
// Print release notes
|
||||
Color bold = Color ("bold");
|
||||
std::cout << bold.colorize (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue