mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-27 12:16:25 +02:00
CmdStop: Obeys :quiet
This commit is contained in:
parent
f5f8f9cee1
commit
6cd1ad66ea
1 changed files with 6 additions and 3 deletions
|
@ -51,6 +51,7 @@ int CmdStop (
|
||||||
log.write ("debug", std::string ("Stopped tracking: ") + latest.serialize ());
|
log.write ("debug", std::string ("Stopped tracking: ") + latest.serialize ());
|
||||||
|
|
||||||
// User feedback.
|
// User feedback.
|
||||||
|
if (! rules.getBoolean ("quiet"))
|
||||||
std::cout << intervalSummarize (rules, latest);
|
std::cout << intervalSummarize (rules, latest);
|
||||||
|
|
||||||
// If tags were specified, and after removing those tags, there are still
|
// If tags were specified, and after removing those tags, there are still
|
||||||
|
@ -71,14 +72,16 @@ int CmdStop (
|
||||||
log.write ("debug", std::string ("Started tracking: ") + latest.serialize ());
|
log.write ("debug", std::string ("Started tracking: ") + latest.serialize ());
|
||||||
|
|
||||||
// User feedback.
|
// User feedback.
|
||||||
|
if (! rules.getBoolean ("quiet"))
|
||||||
std::cout << "\n" << intervalSummarize (rules, latest);
|
std::cout << "\n" << intervalSummarize (rules, latest);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string message = "There is no active time tracking.";
|
std::string message = "There is no active time tracking.";
|
||||||
std::cout << message << "\n";
|
|
||||||
log.write ("warning", message);
|
log.write ("warning", message);
|
||||||
|
if (! rules.getBoolean ("quiet"))
|
||||||
|
std::cout << message << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue