5 ms·
My guess is the ansi color escape codes mess with peoples parsing code of the output when scripting.
by vanattab 8y ago
My guess is the ansi color escape codes mess with peoples parsing code of the output when scripting.
- wruza 8y agoAll sane tools check if output isatty(3) before doing that.
- abstractbeliefs 8y agoMany 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.
- wruza 8y agoMany who? Did I miss the arrival of new “Move Fast Etc” era into unix cli?
- abstractbeliefs 8y agoThere'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.
- masukomi 8y agoas @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.