Many command line utilities (including ls, git, and jq) disable colors and other formatting when the output does not go to a tty. I'd like to see the heroku cli do this.
I like to run things like heroku logs > /tmp/myapp.log and open that in my editor. The color codes are noisy.
On the other hand, I rarely send the output of heroku ps to a pipe or a file. The colors help. Setting NO_COLOR=true for my shell disables that.
Detecting is done with process.stdout.isTTY (already in multiple locations in this repo)
Many command line utilities (including
ls,git, andjq) disable colors and other formatting when the output does not go to a tty. I'd like to see the heroku cli do this.I like to run things like
heroku logs > /tmp/myapp.logand open that in my editor. The color codes are noisy.On the other hand, I rarely send the output of
heroku psto a pipe or a file. The colors help. SettingNO_COLOR=truefor my shell disables that.Detecting is done with
process.stdout.isTTY(already in multiple locations in this repo)