aboutsummaryrefslogtreecommitdiff
path: root/todo.cpp
diff options
context:
space:
mode:
authorache <ache@ache.one>2017-09-19 10:59:48 +0200
committerache <ache@ache.one>2017-09-19 10:59:48 +0200
commit4037bdd829e15eedd1ba9719342f9f8f298c7a21 (patch)
treed398abebfcccc8c19a6709bdd39e9de253954fd8 /todo.cpp
parentGithub todo test (diff)
Color support only if output is term
Diffstat (limited to 'todo.cpp')
-rwxr-xr-xtodo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/todo.cpp b/todo.cpp
index 2770fee..ba9c5ec 100755
--- a/todo.cpp
+++ b/todo.cpp
@@ -129,11 +129,15 @@ void modifyTODO( vector<todo>& listTodo, int argc, char* argv[], Functor modif
int main(int argc, char *argv[]) {
- color = true;
+ color = false;
vector<todo> listTodo;
int action = -1;
int startArgv = 2;
+
+ color = isatty(fileno(stdout));
+
+
if( argc > 1 ) {
// Si la première lettre est une majuscule
bool ok = false;