ogham / rust-ansi-term

Rust library for ANSI terminal colours and styles (bold, underline)

Home Page:https://crates.io/crates/ansi_term

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NO_COLOR support

kucharskim opened this issue · comments

I see many projects using this library, and I don't see simple way to disable colored output for those apps (without code modification). In production environments I like to grep easily logs and colors are making it super difficult.

More info about NO_COLOR environment variable at https://no-color.org/

If NO_COLOR support is added, might be additionally good to add support for CLICOLOR_FORCE which allows you to always enable it. See http://bixense.com/clicolors/.

The good thing about standards is that there are so many to choose from.
  - Andrew Tanenbaum