Great debugging story. I'd have been tearing my hair out over this for ages if it happened to me.
The manuals are a little confusing on the subject (ls describes this behaviour, grep has the same options as ls but doesn't explain them), but I think the culprit here is 'color=always'.
The 'color=auto' setting should tell the command to emit colour codes when the output device is a terminal, but not when it's a pipe to another program.
oh nice, i'll give color=auto a try then. thanks charles!
We’re a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.