Hacker News new | ask | show | jobs
by vanattab 2934 days ago
My guess is the ansi color escape codes mess with peoples parsing code of the output when scripting.
1 comments

All sane tools check if output isatty(3) before doing that.
Many don't though. Typically, though, the place to add no-color is even on the same line as this test and is a very cheap add, so anyone looking to add it would do well to consider adding both.
Many who? Did I miss the arrival of new “Move Fast Etc” era into unix cli?
There's a bunch even on that list. I had a look at ffind, the second on the page and found nothing to test if the output was tty or otherwise.

Generally though, I'm not out to point fingers, it's just a fact that not all software is complete and bug-free. We're all people with limited time and we don't have the attention to detail that dealing with the maliciously compliant children that computers are takes.

as @abstractbeliefs said, there are a lot that don't, but personally i hate it when apps do that because it removes my ability to actually maintain the colors through pipe chains. It's much harder to convince an app to maintain color through a pipe from an app that does this than it is to remove color from an app that doesn't pay attention to tty or not.