Shell – How to Pipe Output of All Entered Commands

piperubyshellstdoutunix

Good Afternoon,

(OS X user)

I am specifically trying to pipe the output of every shell command I type into the ruby gem 'lolcat' (which makes the output to the terminal rainbow colored).

Is there a way to do this without explicitly aliasing command individually? I was thinking perhaps there might be a way to pipe anything before the return key is pressed , but I am not sure how to do this.

Your assistance is appreciated, as I am tired of looking at just one color in my terminal.

Best Answer

You can redirect stdout in your shell:

exec 1> >(lolcat)

BUT

if lolcat sends its own output to stdout, you're bound to run into problems. This might work

exec 1> >(lolcat >&2)
Related Question