#!/bin/bash
-HAS_TTY='y'
-
# Defining colors
RED=""
YELLOW=""
done
# console colors:
- if [ "${use_color}" = "true" ] ; then
+ if [[ "${use_color}" = "true" ]] ; then
RED="\033[38;5;196m"
YELLOW="\033[38;5;226m"
GREEN="\033[38;5;46m"
NORMAL=""
fi
- local my_tty=
- my_tty=$(tty)
- if [[ "${my_tty}" =~ 'not a tty' ]] ; then
- my_tty='-'
- fi
-
- if [[ "${my_tty}" = '-' || "${safe_term}" = "dump" ]] ; then
- # shellcheck disable=SC2034
- HAS_TTY='n'
- fi
-
}
#------------------------------------------------------------------------------