spcd_banner_add/open,split
This commit is contained in:
parent
2500654681
commit
619b374337
1 changed files with 5 additions and 4 deletions
|
@ -1119,25 +1119,21 @@ SPCD_BANNER_VERTICAL="│"
|
|||
|
||||
spcd_banner() {
|
||||
spcd_banner_unset
|
||||
spcd_banner_open
|
||||
#
|
||||
spcd_banner__index="${SPCD_STEP}"
|
||||
[ -n "${SPCD_SUBSTEP}" ] &&
|
||||
spcd_banner__index="${spcd_banner__index}.${SPCD_SUBSTEP}"
|
||||
spcd_banner_add "${spcd_banner__index}"
|
||||
#
|
||||
spcd_banner_split
|
||||
spcd_banner_add "S"
|
||||
#
|
||||
for spcd_banner__item in "${SPCD_STEP_TEXT}" "${SPCD_SUBSTEP_TEXT}"; do
|
||||
if [ -n "${spcd_banner__item}" ]; then
|
||||
spcd_banner_split
|
||||
spcd_banner_add "${spcd_banner__item}"
|
||||
fi
|
||||
done
|
||||
#
|
||||
spcd_banner_close
|
||||
#
|
||||
spcd_banner_echo
|
||||
spcd_banner_unset
|
||||
}
|
||||
|
@ -1149,6 +1145,11 @@ spcd_banner_add() {
|
|||
spcd_ba__filler="$(
|
||||
spcd_fill "${spcd_ba__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}"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue