mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
init: Color enabling defaulting according to tty
This commit is contained in:
parent
96250afdca
commit
0dd15eb5b9
1 changed files with 2 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
#include <iostream>
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -100,7 +101,7 @@ void initializeDataAndRules (
|
|||
Rules& rules)
|
||||
{
|
||||
// Rose tint my world, make me safe from my trouble and pain.
|
||||
rules.set ("color", "on");
|
||||
rules.set ("color", isatty (STDOUT_FILENO) ? "on" : "off");
|
||||
|
||||
// Make common hints available via rules:
|
||||
// :debug --> debug=on
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue