From ca865f9d260d9c34d49dff9c756758b4d31b1633 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sun, 13 May 2018 09:37:54 +0200 Subject: [PATCH] Enable ANSI support on Windows 10 --- src/app.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app.rs b/src/app.rs index 7cd78f48..2bb22670 100644 --- a/src/app.rs +++ b/src/app.rs @@ -15,6 +15,9 @@ impl App { pub fn new() -> Self { let interactive_output = atty::is(Stream::Stdout); + #[cfg(windows)] + let interactive_output = interactive_output && ansi_term::enable_ansi_support().is_ok(); + App { matches: Self::matches(interactive_output), interactive_output,