From ed1e64ee18b597673a719dd686c7a2e468dfed3a Mon Sep 17 00:00:00 2001 From: Arjun Prasad Date: Wed, 7 Aug 2024 15:09:35 -0400 Subject: [PATCH] Avoid warnings from tput --- test_stxtyper.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_stxtyper.sh b/test_stxtyper.sh index 59c73dc..8fca72c 100755 --- a/test_stxtyper.sh +++ b/test_stxtyper.sh @@ -19,15 +19,15 @@ TEST_TEXT='' echo "TERM=$TERM" # some color macros -if [ "$TERM" != "" ] +if [ "$TERM" == "" || "$TERM" == "dumb" ] then - green=`tput setaf 2` # Set green foreground color (code 2) - red=`tput setaf 1` # Set red foreground color (code 1) - reset=`tput sgr0` # Reset color to default -else green='' # no colors red='' reset='' +else + green=`tput setaf 2` # Set green foreground color (code 2) + red=`tput setaf 1` # Set red foreground color (code 1) + reset=`tput sgr0` # Reset color to default fi function test_input_file {