]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
--list: do not use colors if stdout is not a TTY
[vlc] / src / libvlc.c
index f9e87ad6bbaf95dafbfbe93dc31917014b3e29a8..96dae5c2364eebd801174025035a2decb934580f 100644 (file)
@@ -1920,6 +1920,10 @@ 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 */