PS1 that ends with an opening color sequence (like
\[\e[0;32m\]) to have all text in the terminal colored (green in this case). However, when I use a command such as
ls (which is aliased to
ls --color=auto in my
.bashrc) the colors in the output are a little messed up: green up to the first "colored" word, and the following uncolored text is white instead of green.
Is there a way to have clean output in all cases? I'm okay with white as "default" text color when the output has colors, but I'd like it to be consistent.
Of course, I'd most like a solution that would automatically apply to all commands and that wouldn't require me to change the way I invoke them.
Personally, I don't have any ideas. Maybe something can be done to search for escape sequences in the output "on the fly" and perform some substitutions? I don't know how to implement this, though, especially so that it's done "behind the scenes".