For tools that don't honor NO_COLOR, I have a filter called nofun, which gets rid of color and animations.
I'm sure you can even do some clever bash-foo to run your term sessions through it, like how screen or tmux work.
Why prefer
NO_COLOR=true command
over command | nofun
?The latter seems both cleaner to me and it doesn’t require modification of all existing CLI programs to work.
sed 's/\x1b\[[;0-9]*m//g'> One could do this with GNU sed, but developers working in proprietary operating systems don't have GNU sed.