feature(HELPERSCRIPTS): add newline function, bold formatting preset

This commit is contained in:
Asif Bacchus 2021-01-15 05:50:01 -07:00
parent 0a99c75a91
commit 38d6967f68

View File

@ -35,8 +35,13 @@ textblockParam() {
printf "%s%s%s\n" "$info" "$1" "$norm" printf "%s%s%s\n" "$info" "$1" "$norm"
} }
textNewline() {
printf "\n"
}
### text formatting presets ### text formatting presets
if command -v tput >/dev/null 2>&1; then if command -v tput >/dev/null 2>&1; then
bold=$(tput bold)
err=$(tput bold)$(tput setaf 1) err=$(tput bold)$(tput setaf 1)
info=$(tput bold)$(tput setaf 6) info=$(tput bold)$(tput setaf 6)
header=$(tput bold)$(tput setaf 5) header=$(tput bold)$(tput setaf 5)
@ -45,6 +50,7 @@ if command -v tput >/dev/null 2>&1; then
warn=$(tput bold)$(tput setaf 3) warn=$(tput bold)$(tput setaf 3)
width=$(tput cols) width=$(tput cols)
else else
bold=''
err='' err=''
info='' info=''
header='' header=''