mikefarah / yq

yq is a portable command-line YAML, JSON, XML, CSV, TOML and properties processor
https://mikefarah.gitbook.io/yq/
MIT License
12.36k stars 602 forks source link

Feature request: NO_COLOR standard implementation #2150

Closed hellishvictor closed 1 week ago

hellishvictor commented 2 months ago

Hi, it would be great implement the NOCOLOR standard on yq since there's many CLI already with it (jaq, miller, crop, upx, python, xq, etc..,) and save the users from use "color=never", "--monochrome-color"_ or whatever.

Command-line software which adds ANSI color to its output by default should check
 for a NO_COLOR environment variable that, when present and not an empty string
 (regardless of its value), prevents the addition of ANSI color.

By adopting this standard, users that prefer to have plain, non-colored text output
 can export NO_COLOR=1 to their shell’s environment and automatically disable color
 by default in all supported software.

If your software outputs color by default, please consider not doing so. 

More info on: https://no-color.org/

Cheers.