For months I mused about a way to funnel everything in a terminal through lolcat. Somewhere along the way I came across Bash’s DEBUG signal. From The Linux Documentation Project on trap: “If one of the signals is DEBUG, the list of COMMANDS is executed after every simple command.” This is the lead I needed!
In prep, install lolcat to the system ruby:
Drop this into your .bash_profile, and watch the rainbows happen.
Similarly, for Fish Shell, place this in your ~/.config/fish/config.fish:
And for ZSH, something like this:
I ran into a particular problem with oh my zsh using this. In order to render the prompt, OMZ calls several hundred functions, each in turn calling lolcatme(). Unfortunately, this performance hit is substantial and makes the shell almost unusable.