Is it possible to configure the terminal in OS X to show stderr
output automatically in a different colour than stdout
output from a process?
Or is this only possible if the process is outputting coloured output?
colorterminal
Is it possible to configure the terminal in OS X to show stderr
output automatically in a different colour than stdout
output from a process?
Or is this only possible if the process is outputting coloured output?
Best Answer
There is no straightforward solution, but there are at least a few workarounds available to do this.
You can install hilite by building the single C file (
hilite.c
in this case) or by usingbrew install hilite
(with homebrew installed on the system). Use it ashilite <command>
.You can use the command from this answer on serverfault (substitute
command
with the name of your script/command) to make stderr appear in red (for other colors, refer the ANSI escape sequences list and change the 31m in the below command accordingly):You can use stderred to color stderr in red.