explicitly enable ansi support for windows

This commit is contained in:
Nikolas Schmidt-Voigt 2021-08-30 09:09:18 +02:00
parent 964458007e
commit 22aab0f31d

View file

@ -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 <nikolas.schmidt-voigt@posteo.de>")