Merge pull request #124 from tomice/master

Fix escape sequences when outputting to non-TTYs
This commit is contained in:
Lukáš Mešťan 2021-03-31 17:31:28 +02:00 committed by GitHub
commit 292876846d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -224,12 +224,9 @@ showMenu() {
# OUTS: None
################################################################################
function optionPicked() {
local -r bold=$(tput bold)
local -r red=$(tput setaf 1)
local -r reset=$(tput sgr0)
local msg=${*:-"${reset}Error: No message passed"}
local msg=${*:-"Error: No message passed"}
echo -e "${bold}${red}${msg}${reset}\n"
echo -e "${msg}\n"
}
################################################################################