From: RĂ©mi Denis-Courmont Date: Wed, 23 Dec 2009 19:20:15 +0000 (+0200) Subject: --list: do not use colors if stdout is not a TTY X-Git-Tag: 1.1.0-ff~1771 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=633a5efc47a2748fcf87cf51e93036a9a8eb8bef;p=vlc --list: do not use colors if stdout is not a TTY This is consistent with --help behaviour. --- 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 */