22 lines
467 B
Plaintext

local type=$1
shift
local full_msg=""
for arg in "$@"; do
if [[ -n "${qsgenlang[$arg]}" ]]; then
full_msg+="${qsgenlang[$arg]}"
else
full_msg+="$arg"
fi
done
local color="${end}"
case $type in
std) color="${green}" ;;
info) color="${yellow}" ;;
debug) color="${red}" ;;
other) color="${bold_yellow}" ;;
sub) color="${magenta}" ;;
main) color="${white}${green_bg}" ;;
esac
printf "${color}%b${end}\n" "${full_msg}"