Merge pull request #1289 from drwetter/tput_sgr_fix

Fix terminal codes / tput
This commit is contained in:
Dirk Wetter 2019-07-03 11:54:56 +02:00 committed by GitHub
commit eef63b1726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -666,7 +666,6 @@ set_color_functions() {
type -p tput &>/dev/null || return 0 # Hey wait, do we actually have tput / ncurses ?
tput cols &>/dev/null || return 0 # tput under BSDs and GNUs doesn't work either (TERM undefined?)
tput sgr0 &>/dev/null || ncurses_tput=false
tput sgr 0 1 &>/dev/null || ncurses_tput=false # OpenBSD succeed the previous one but fails here
if [[ "$COLOR" -ge 2 ]]; then
if $ncurses_tput; then
red=$(tput setaf 1)