Hi Tobias,
> Tobias Geerinckx-Rice wrote: >> Björn Höfling wrote: >>> ls has a colored output. Nice. >>> ls | less has ugly escape sequences. Only ls --color=no | less >>> works. >> >> I'd be surprised if ‘ls | less -R’ didn't (and that would be a bug). >> >> Otherwise, this is standard behaviour for both ‘ls’ and ‘less’. > > Apologies, I made a reado. > > ‘ls | $foo’ should indeed detect a missing tty and stop spewing colour > automatically. At least if ‘ls’ is properly aliased to ‘ls > --color=auto’. > > Instead, it is aliased[0] to use ‘--color’ — short for ‘ls > --color=always’ — for reasons I cannot understand. We do the same for > ‘grep’. I think this is simply a mistake. Using “--color=auto” is correct here. > On the other hand, what I consider an obvious bug has been around > since literal forever[1], so maybe I'm missing something obvious > here. I've CC'd the original author. If everyone agrees or nobody > responds, I'd like to change it to something less aggressive before > 0.15.[2] No objections from me. Thank you! -- Ricardo