I'm compiling a file with gcc (actually I'm make'ing, but never mind), which sends some colorized error messages to stderr. So, I do:
gcc a.c 2>&1 | less
but what I get is lines such as:
a.c: In function <E2><80><98>whatever(int)<E2><80><99>: a.c:11:10: warning: etc etc
that is, I see the numeric escape codes rather than the colors.
I tried to follow the advice in this answer on SU, but it didn't work for me. Or rather,
ls --color | less works, but not my gcc command above. What should I do?
- I'm connected to this machine via SSH, with
- Without piping through
less, I do get the colors on the terminal.