From: Junio C Hamano Date: Sat, 05 Aug 2006 11:42:29 GMT Subject: Re: [PATCH] git-status: colorize status output Message-ID: <7v64h7e7dm.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <20060805112851.GA20807@moooo.ath.cx> Matthias Lederhofer writes: > Junio C Hamano wrote: >> Matthias Lederhofer writes: >> >> Color support is controlled by status.color and status.color.*. There is no >> >> command line option, and the status.color variable is a simple boolean (no >> >> checking for tty output). >> > Is there any way to do isatty() from shell scripts? >> >> Yes. > How? :) Arrrrrrrgh! The message I wanted to send you went to Jeff. Your Mail-Followup-To: fooled me. Please do not do this. $ git grep -B1 'standard input' -- '*.sh' git-commit.sh- test -t 0 && git-commit.sh: echo >&2 "(reading log message from standard input)" > Is there any reason not checking isatty()? Not that I can think of, but do people really run "git status"? I think Jeff's follow-up "vim colorizer" makes a lot more sense than colorizing "git status" output -- it gives reminder during the last chance the user has to notice such problems, which is while composing the commit log message.