From dfcabb57227be1572dac1c53be9e6cc188a5f302 Mon Sep 17 00:00:00 2001 From: James Conroy Date: Thu, 10 Feb 2022 19:32:14 -0600 Subject: [PATCH] Seperate bold attribute from colors As suggested by @rwwiv Co-authored-by: William Wernert --- salt/common/tools/sbin/so-status | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/salt/common/tools/sbin/so-status b/salt/common/tools/sbin/so-status index a2b430ea8..16b5233d0 100755 --- a/salt/common/tools/sbin/so-status +++ b/salt/common/tools/sbin/so-status @@ -178,10 +178,11 @@ print_line() { local columns=35 # value used if not printing to a tty if (( __tty == 1 )); then - local NC; NC="$(tput sgr0)" # no color - local red; red="$(tput setaf 1 bold)" - local green; green="$(tput setaf 2 bold)" - local yellow; yellow="$(tput setaf 3 bold)" + local reset_attr; reset_attr="$(tput sgr0)" # reset all attributes + local bold; bold="$(tput bold)" + local red; red="$(tput setaf 1)" + local green; green="$(tput setaf 2)" + local yellow; yellow="$(tput setaf 3)" PADDING_CONSTANT=16 # two tabs wide columns=$(tput cols)