From 619b3743370997fbfbdd84a32883ba3de90571ac Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 25 Aug 2024 16:08:12 +0200 Subject: [PATCH] spcd_banner_add/open,split --- spcd/main.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index cb95842..c3cab20 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -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