Skip to content

Commit

Permalink
Fix terminal codes / tput
Browse files Browse the repository at this point in the history
As noted in #1288 with some terminal settings under Linux there
appeared some ~garbage on the screen.

This fixes that by partly reverting 695d021 .
At least now and under an older OpenBSD like 6.2 this doesn't seem
to be necessary.
  • Loading branch information
drwetter committed Jul 3, 2019
1 parent 3d5982e commit af6f232
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion testssl.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ set_color_functions() {
type -p tput &>/dev/null || return 0 # Hey wait, do we actually have tput / ncurses ? 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 cols &>/dev/null || return 0 # tput under BSDs and GNUs doesn't work either (TERM undefined?)
tput sgr0 &>/dev/null || ncurses_tput=false 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 [[ "$COLOR" -ge 2 ]]; then
if $ncurses_tput; then if $ncurses_tput; then
red=$(tput setaf 1) red=$(tput setaf 1)
Expand Down

0 comments on commit af6f232

Please sign in to comment.