diff --git a/spcd/main.sh b/spcd/main.sh index 7b829c6..a816a7f 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -832,9 +832,16 @@ spcd_banner_add() { spcd_ba__text=" ${1} " spcd_ba__length=${#spcd_ba__text} spcd_ba__filler="$(spcd_fill "${spcd_ba__length}" ─)" - SPCD_BANNER_1="${SPCD_BANNER_1}${spcd_ba__filler}" - SPCD_BANNER_2="${SPCD_BANNER_2}${spcd_ba__text}" - SPCD_BANNER_3="${SPCD_BANNER_3}${spcd_ba__filler}" + spcd_banner_add_123 \ + "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" + fi +} + +spcd_banner_add_123() { + if [ -n "${3}" ]; then + SPCD_BANNER_1="${SPCD_BANNER_1}${1}" + SPCD_BANNER_2="${SPCD_BANNER_2}${2}" + SPCD_BANNER_3="${SPCD_BANNER_3}${3}" fi }