From 462d4c594aa1a583c823db21bcba5aabc692b22d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Wed, 2 Nov 2016 00:54:52 +1100 Subject: [PATCH] prin: Fix bold not working, Add prin tests to travis --- neofetch | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/neofetch b/neofetch index b7d3aa5f..afb29d51 100755 --- a/neofetch +++ b/neofetch @@ -2348,13 +2348,10 @@ info() { # Prin {{{ prin() { - string="$1${2:+: $2}" + string="${1//$'\033[0m'}${2:+: $2}" # If $2 doesn't exist we format $1 as info - if [ -z "$2" ]; then - local subtitle_color="$info_color" - bold= - fi + [ -z "$2" ] && local subtitle_color="$info_color" # Format the output string="${string/:/${reset}${colon_color}:${info_color}}" @@ -3194,6 +3191,12 @@ getargs() { info "$(tr '[:lower:]' '[:upper:]' <<< "$func")" "$func" done + info linebreak + + prin "PRIN TEST" "$(color 1)1$(color 2)2$(color 3)3" + prin "SUBTITLE" + prin "$(color 5)SUBTITLE2" + info linebreak info cols info linebreak