Skip to content

Commit

Permalink
Avoid warnings from tput
Browse files Browse the repository at this point in the history
  • Loading branch information
evolarjun committed Aug 7, 2024
1 parent a0e1071 commit ed1e64e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test_stxtyper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ed1e64e

Please sign in to comment.