News for hackers. Stuff that matters.
Re:Show HN: Grep with colours written in Go by vanattab on Tuesday June 05, 2018 @11:54PM (#17244247)
My guess is the ansi color escape codes mess with peoples parsing code of the output when scripting.
Re:Show HN: Grep with colours written in Go by wruza on Wednesday June 06, 2018 @12:14AM (#17244318)
All sane tools check if output isatty(3) before doing that.
Re:Show HN: Grep with colours written in Go by abstractbeliefs on Wednesday June 06, 2018 @12:25AM (#17244347)
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.
Re:Show HN: Grep with colours written in Go by wruza on Wednesday June 06, 2018 @12:35AM (#17244380)
Many who? Did I miss the arrival of new “Move Fast Etc” era into unix cli?
Re:Show HN: Grep with colours written in Go by abstractbeliefs on Wednesday June 06, 2018 @12:45AM (#17244420)
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.

Re:Show HN: Grep with colours written in Go by masukomi on Wednesday June 06, 2018 @09:38PM (#17252580)
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.