I know how to change the color of ls output, but I would like to change the color of all terminal output.
To make clear what I mean, below is a picture of my terminal. My text color is orange.
However, I would want the -bash: p: command not found
, test
, and the output of df
to be a different color, so that it is easier to see the difference between what I type. Is this possible?
This is how it looks with @jmhindle answer. You can change the number after setaf for a different color (e.g. 2 for green).
Best Answer
I think you can do this by installing a DEBUG trap in ~/.bash_profile.
See the answer to this superuser question.
I added the following:
tput setaf 4
changes foreground colour to blue.