From: Simon Ruderich Date: Tue, 10 Mar 2009 16:20:58 +0000 (+0100) Subject: zsh: Colorize stderr. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=0d746097c2d7c17c12c0d59e92d8eae6a01c8b89;p=config%2Fdotfiles.git zsh: Colorize stderr. Doesn't work all the time but it's very useful. --- diff --git a/zsh/rc b/zsh/rc index 02c13d1..8c57d17 100644 --- a/zsh/rc +++ b/zsh/rc @@ -343,6 +343,11 @@ todo() { fi } +# Colorize stderr. Very useful when looking for errors. Thanks to +# http://gentoo-wiki.com/wiki/Zsh +exec 2>>(while read line; do + print '\e[91m'${(q)line}'\e[0m' > /dev/tty; print -n $'\0'; done &) + # RUN COMMANDS