@@ -335,6 +335,15 @@ impl App {
335335 pub fn config(&self) -> Result<Config> {
336336 let files = self.files();
337337
338+ let colored_output = match self.matches.value_of("color") {
339+ Some("always") => true,
340+ Some("never") => false,
341+ Some("auto") | _ => self.interactive_output,
342+ };
343+
344+ #[cfg(windows)]
345+ let colored_output = colored_output && ansi_term::enable_ansi_support().is_ok();
346+
338347 Ok(Config {
339348 true_color: is_truecolor_terminal(),
340349 output_components: self.output_components()?,
@@ -349,11 +358,7 @@ impl App {
349358 Some("never") | _ => OutputWrap::None,
350359 }
351360 },
352− colored_output: match self.matches.value_of("color") {
353− Some("always") => true,
354− Some("never") => false,
355− Some("auto") | _ => self.interactive_output,
356− },
361+ colored_output,
357362 paging_mode: match self.matches.value_of("paging") {
358363 Some("always") => PagingMode::Always,
359364 Some("never") => PagingMode::Never,