Added output of number of tasks to be modified in batch mode
This commit is contained in:
committed by
Tomas Babej
parent
178c17d032
commit
bd2ad97ccb
@@ -70,6 +70,9 @@ int CmdAnnotate::execute (std::string&)
|
|||||||
// Accumulated project change notifications.
|
// Accumulated project change notifications.
|
||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
Task before (task);
|
Task before (task);
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ int CmdAppend::execute (std::string&)
|
|||||||
// Accumulated project change notifications.
|
// Accumulated project change notifications.
|
||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
Task before (task);
|
Task before (task);
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ int CmdDelete::execute (std::string&)
|
|||||||
// Accumulated project change notifications.
|
// Accumulated project change notifications.
|
||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
Task before (task);
|
Task before (task);
|
||||||
|
|||||||
@@ -87,6 +87,9 @@ int CmdDenotate::execute (std::string&)
|
|||||||
// Accumulated project change notifications.
|
// Accumulated project change notifications.
|
||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
Task before (task);
|
Task before (task);
|
||||||
|
|||||||
@@ -69,6 +69,10 @@ int CmdDone::execute (std::string&)
|
|||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
Task& lowest = filtered.front();
|
Task& lowest = filtered.front();
|
||||||
|
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
Task before (task);
|
Task before (task);
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ int CmdModify::execute (std::string&)
|
|||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
auto count = 0;
|
auto count = 0;
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
Task before (task);
|
Task before (task);
|
||||||
|
|||||||
@@ -70,6 +70,9 @@ int CmdPrepend::execute (std::string&)
|
|||||||
// Accumulated project change notifications.
|
// Accumulated project change notifications.
|
||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
Task before (task);
|
Task before (task);
|
||||||
|
|||||||
@@ -69,6 +69,9 @@ int CmdStart::execute (std::string&)
|
|||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
bool nagged = false;
|
bool nagged = false;
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
if (! task.has ("start"))
|
if (! task.has ("start"))
|
||||||
|
|||||||
@@ -67,6 +67,9 @@ int CmdStop::execute (std::string&)
|
|||||||
// Accumulated project change notifications.
|
// Accumulated project change notifications.
|
||||||
std::map <std::string, std::string> projectChanges;
|
std::map <std::string, std::string> projectChanges;
|
||||||
|
|
||||||
|
if(filtered.size() > 1) {
|
||||||
|
std::cout << "This command will alter " << format(filtered.size()) << " tasks." << std::endl;
|
||||||
|
}
|
||||||
for (auto& task : filtered)
|
for (auto& task : filtered)
|
||||||
{
|
{
|
||||||
if (task.has ("start"))
|
if (task.has ("start"))
|
||||||
|
|||||||
Reference in New Issue
Block a user