Prin format changes

This commit is contained in:
Dylan 2016-04-02 11:34:04 +11:00
parent 269a979464
commit 5ec79cf617

View file

@ -2220,21 +2220,15 @@ info () {
# Prin {{{ # Prin {{{
prin () { prin () {
case "$1" in if [ -z "$2" ]; then
*:*)
subtitle=${1%%:*}
output=${1#*: }
string="${bold}${subtitle_color}${subtitle}${clear}"
string+="${colon_color}: ${info_color}${output}"
length=$((${#subtitle} + ${#output} + 1))
;;
*)
string="${info_color}${1}" string="${info_color}${1}"
length=${#1} length=${#1}
;;
esac else
string="${bold}${subtitle_color}${1}${clear}"
string+="${colon_color}: ${info_color}${2}"
length=$((${#subtitle} + ${#2} + 1))
fi
# Print the info # Print the info
printf "%b%s\n" "${padding}${string}${clear}" printf "%b%s\n" "${padding}${string}${clear}"