mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdDefault: Obeys :quiet
This commit is contained in:
parent
e202bcb5ce
commit
39daf9a422
1 changed files with 9 additions and 6 deletions
|
@ -32,12 +32,15 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int CmdDefault (Rules& rules, Database& database)
|
||||
{
|
||||
// Load the most recent interval, summarize and display.
|
||||
auto interval = database.getLatestInterval ();
|
||||
if (interval.isStarted () && ! interval.isEnded ())
|
||||
std::cout << intervalSummarize (rules, database.getLatestInterval ());
|
||||
else
|
||||
std::cout << "There is no active time tracking.\n";
|
||||
if (rules.getBoolean ("verbose"))
|
||||
{
|
||||
// Load the most recent interval, summarize and display.
|
||||
auto interval = database.getLatestInterval ();
|
||||
if (interval.isStarted () && ! interval.isEnded ())
|
||||
std::cout << intervalSummarize (rules, database.getLatestInterval ());
|
||||
else
|
||||
std::cout << "There is no active time tracking.\n";
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue