3 ms·
> When you run ripgrep with its output connected to a tty, then its output is "prettified." That means results are grouped by file, colorized and include line n
by TeMPOraL 8y ago
> When you run ripgrep with its output connected to a tty, then its output is "prettified." That means results are grouped by file, colorized and include line numbers. But if you aren't connected to a tty, then ripgrep reverts to the standard grep format (e.g., no line numbers).
That sounds both good (for direct use) and bad (for developing scripts) at the same time. And it's a general pattern. I wonder, is there a standard UNIX/Linux way of saying "run this, but pretend I'm not connected to a tty"?
- burntsushi 8y agoI just add `| cat` to the end of my pipeline. It hasn't failed me yet. I don't think this has been an issue for me yet, but it has tripped some people up, yes. Overall, I think it's worth it.
- sunfish 8y ago"| cat" has this effect.