6 Commits

Author SHA1 Message Date
Markus Reiter
13d9305fad Cache Tty.width, since it is used heavily because of ohai. 2018-06-15 13:56:08 +02:00
lukertty
f308aa4800
Tty.width: use tput cols when stty size returns 0;
bin/brew: add 'COLUMNS' and 'LINES' to env variables

Signed-off-by: lukertty <lukertty@gmail.com>
2018-05-30 12:29:24 +08:00
joshua stein
7388acb86e Tty: if HOMEBREW_NO_COLOR env var is present, disable color
bin/brew will recognize NO_COLOR variable and copy it to
HOMEBREW_NO_COLOR
2018-02-12 14:19:25 -06:00
Mike McQuaid
2cf2c020ba tty: handle non-tty stdin.
When stdin is not a tty then the message `stty: stdin isn't a terminal`
will be produced. Silence this message and fall back to `tput` when it
fails and default to 80 if we get no results at all.

Follow-up from #2714.
2017-06-07 06:57:50 +01:00
Enrico Ghirardi
a9c83f14a7
Use stty instead of tput to get terminal width
Fixes https://github.com/Homebrew/brew/issues/2707
2017-06-02 17:00:52 +02:00
Markus Reiter
6d8ee395fa Refactor Tty. 2016-10-01 20:00:49 +02:00