From 60e8f2a016a5d69b91990b5672879139d6476792 Mon Sep 17 00:00:00 2001 From: dylan araps Date: Mon, 4 Jan 2016 10:33:45 +1100 Subject: [PATCH] Fixed colon bug and fixed underline length --- fetch.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fetch.sh b/fetch.sh index 872f59b7..bccf2d91 100755 --- a/fetch.sh +++ b/fetch.sh @@ -725,8 +725,9 @@ printinfo () { case "$info" in echo:*:*) info=${function#*: } - subtitle=${function%:*} + subtitle=${function/:*/} string="${bold}${subtitle_color}${subtitle}${clear}${colon_color}: ${info_color}${info}" + length=${#function} ;; echo:*) @@ -766,7 +767,7 @@ printinfo () { *:*) string="${bold}${subtitle_color}${subtitle}${clear}${colon_color}: ${info_color}${output}" - length=${#subtitle} + length=$((${#subtitle} + ${#output} + 2)) ;; *)