diff options
author | ache <ache@ache.one> | 2017-09-19 10:59:48 +0200 |
---|---|---|
committer | ache <ache@ache.one> | 2017-09-19 10:59:48 +0200 |
commit | 4037bdd829e15eedd1ba9719342f9f8f298c7a21 (patch) | |
tree | d398abebfcccc8c19a6709bdd39e9de253954fd8 /todo.cpp | |
parent | Github todo test (diff) |
Color support only if output is term
Diffstat (limited to 'todo.cpp')
-rwxr-xr-x | todo.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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; |