git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-status: colorize status output

From
Junio C Hamano <junkio@cox.net>
Date
Aug 5, 2006, 11:42 UTC
Message-ID
<7v64h7e7dm.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060805112851.GA20807@moooo.ath.cx>
Matthias Lederhofer <matled@gmx.net> writes:
Show 9 quoted lines
> Junio C Hamano <junkio@cox.net> wrote:
>> Matthias Lederhofer <matled@gmx.net> 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.

Previous: Matthias LederhoferNext: Matthias Lederhofer
Message 11 of 21 in “git-status: colorize status output”
  1. git-status: colorize status outputJeff King, Aug 5, 2006
  2. Jeff KingAug 5, 2006
  3. Greg KHAug 5, 2006
  4. Junio C HamanoAug 5, 2006
  5. Jeff KingAug 5, 2006
  6. Jeff KingAug 5, 2006
  7. Matthias LederhoferAug 5, 2006
  8. Junio C HamanoAug 5, 2006
  9. Junio C HamanoAug 5, 2006
  10. Matthias LederhoferAug 5, 2006
  11. Junio C HamanoAug 5, 2006
  12. Matthias LederhoferAug 5, 2006
  13. Jeff KingAug 5, 2006
  14. Matthias LederhoferAug 5, 2006
  15. Jeff KingAug 5, 2006
  16. Jeff KingAug 5, 2006
  17. Sam RavnborgAug 7, 2006
  18. Jeff KingAug 5, 2006
  19. Matthias LederhoferAug 5, 2006
  20. Joel BeckerAug 6, 2006
  21. Jeff KingAug 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.