From 0d746097c2d7c17c12c0d59e92d8eae6a01c8b89 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 10 Mar 2009 17:20:58 +0100 Subject: [PATCH 1/1] zsh: Colorize stderr. Doesn't work all the time but it's very useful. --- zsh/rc | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.44.2