From 633a5efc47a2748fcf87cf51e93036a9a8eb8bef Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Wed, 23 Dec 2009 21:20:15 +0200 Subject: [PATCH] --list: do not use colors if stdout is not a TTY This is consistent with --help behaviour. --- src/libvlc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libvlc.c b/src/libvlc.c index 53b77470bd..96dae5c236 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1921,6 +1921,9 @@ static void ListModules( libvlc_int_t *p_this, bool b_verbose ) #ifdef WIN32 ShowConsole( true ); b_color = false; // don't put color control codes in a .txt file +#else + if( !isatty( 1 ) ) + b_color = false; #endif /* List all modules */ -- 2.39.5