color by default

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема color by default
Дата
Msg-id bbdcce43-bd2e-5599-641b-9b44b9e0add4@2ndquadrant.com
обсуждение исходный текст
Ответы Re: color by default  (Juan José Santamaría Flecha <juanjo.santamaria@gmail.com>)
Re: color by default  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
With the attached patch, I propose to enable the colored output by 
default in PG13.

For those who don't like color output, I also add support for the 
environment variable NO_COLOR, which is an emerging standard for turning 
off color across different software packages (https://no-color.org/). 
Of course, you can also continue to use the PG_COLOR variable.

I have looked around how other packages do the automatic color 
detection.  It's usually a combination of mysterious termcap stuff and 
slightly less mysterious matching of the TERM variable against a list of 
known terminal types.  I figured we can skip the termcap stuff and still 
get really good coverage in practice, so that's what I did.

I have also added a documentation appendix to explain all of this. 
(Perhaps we should now remove the repetitive mention of the PG_COLOR 
variable in each man page, but I haven't done that in this patch.)

I'm aware of the pending patch to improve color support on Windows. 
I'll check that one out as well, but it appears to be orthogonal to this 
one.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Maxim Orlov
Дата:
Сообщение: [PATCH] lazy relations delete
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] Fix PostgreSQL 12.1 server build and install problemsunder MSYS2