Remix.run Logo
burntsushi 17 hours ago

> I don't expect the tools to change their output format on me.

You probably do! If you've ever used `ls`, then it does exactly this.

sudahtigabulan 16 hours ago | parent [-]

If you mean the ANSI color stuff, yes - I do expect these to disappear :)

I meant the "shape" of the output. It just doesn't follow the principle of least surprise.

edit: you probably meant the columns. I forgot about that, I haven't parsed ls(1) output in ages ;)

burntsushi 14 hours ago | parent | next [-]

Yes. The columns. The point is that commands have been changing their output format, not just their colors, based on tty for ages. So the criticism you lodge against ripgrep also applies to some of the most core commands you probably use daily.

I would be quite surprised if you didn't rely on this without even knowing it. Even a simple `ls | wc -l` relies on it.

I say this because it's tiring to see folks lament about this feature in ripgrep as if it's something new that ripgrep does. It's not. It's a well established idiom among Unix command line tools.

volemo 5 hours ago | parent | prev [-]

Isn’t “don’t parse ls” like the third commandment of Unix?

burntsushi 38 minutes ago | parent [-]

You've never done `ls | wc -l`?