on master help sign in
Enable ANSI support on Windows 10
ca865f9sharkdp
src/app.rs+3
@@ -15,6 +15,9 @@ impl App {
15 pub fn new() -> Self {
15 pub fn new() -> Self {
16 let interactive_output = atty::is(Stream::Stdout);
16 let interactive_output = atty::is(Stream::Stdout);
17
17
18+ #[cfg(windows)]
19+ let interactive_output = interactive_output && ansi_term::enable_ansi_support().is_ok();
20+
18 App {
21 App {
19 matches: Self::matches(interactive_output),
22 matches: Self::matches(interactive_output),
20 interactive_output,
23 interactive_output,