colored-rs / colored

(Rust) Coloring terminal so simple you already know how to do it !

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

I'm having issue with powershell

mrquantumoff opened this issue · comments

So, I have compiled my app for windows and I see this.

image

As you see clap's coloured output is ok, but mine is strange, does anybody know what to do with this?

I made it work by adding a few lines of code in the main function

fn main() {
 #[cfg(windows)] {
      let _varname = colored::control::set_virtual_terminal(true).unwrap_or(());
  }
}

Thanks @mrquantumoff. If you would like to add some documentation in the readme as a PR that would help heaps.