3 ms·
> problem 9: commands disabling colours when writing to a pipe An alternative to the suggested unbuffer trick is to tell your receiving programs to handle colo
by 3np 2y ago
> problem 9: commands disabling colours when writing to a pipe
An alternative to the suggested unbuffer trick is to tell your receiving programs to handle color by default (case-by-case or in .profile)
LESS=-R less
> LS_COLORS
man dircolors(1) has more info
- joveian 2y agoThis isn't an alternative since most programs won't send the color by default to a pipe (however, it is much better to use less -R than the article's -r so you don't get other escape codes causing trouble). The alternative to unbuffer is that most commands that use color (in my experience) recognize --color=always (or --color=never or the usual default --color=auto for no color to pipes).