From 22aab0f31d5bbd1fa9225dcf3b87d229a8e2e503 Mon Sep 17 00:00:00 2001 From: Nikolas Schmidt-Voigt Date: Mon, 30 Aug 2021 09:09:18 +0200 Subject: [PATCH] explicitly enable ansi support for windows --- src/main.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main.rs b/src/main.rs index 23881bb..77837aa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,8 +1,15 @@ use anyhow::{bail, Context, Result}; use chrono::{NaiveDate, Local, Duration}; use clap::{App, AppSettings, Arg, ArgMatches, SubCommand}; +use nu_ansi_term::enable_ansi_support; fn main() -> Result<()> { + + #[cfg(windows)] + if let Err(e) = enable_ansi_support() { + println!("Could not enable ansi support! Errorcode: {}", e); + } + let matches = App::new("bartib") .version("0.1") .author("Nikolas Schmidt-Voigt ")