banner/add
This commit is contained in:
parent
3634ea4a77
commit
835ad7279c
1 changed files with 4 additions and 7 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue