diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 41aad1f..666b589 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -27,18 +27,15 @@ _SPCD_BANNER_VERTICAL="│" _spcd_banner_add() { if [ -n "${1}" ]; then - spcd_ba__text=" ${1} " - spcd_ba__length=${#spcd_ba__text} - spcd_ba__filler="$( - _spcd_fill "${spcd_ba__length}" "${_SPCD_BANNER_HORIZONTAL}" - )" + local text=" ${1} " + local length=${#text} + local filler="$(_spcd_fill "${length}" "${_SPCD_BANNER_HORIZONTAL}")" if [ -n "${__SPCD_BANNER_MIDDLE}" ]; then _spcd_banner_split else _spcd_banner_open fi - _spcd_banner_append \ - "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" + _spcd_banner_append "${filler}" "${text}" "${filler}" fi }