diff --git a/spcd/main.sh b/spcd/main.sh index 2b1991d..13f010e 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -876,7 +876,7 @@ spcd_step() { spcd_step__index="${spcd_step__prefix}_INDEX" eval "${spcd_step__index}=\$((${spcd_step__index} + 1))" eval "${spcd_step__prefix}_LABEL=\"${1}\"" - spcd_banner + spcd_banner_render fi } @@ -1117,22 +1117,6 @@ SPCD_BANNER_UP_AND_LEFT="╯" SPCD_BANNER_UP_AND_RIGHT="╰" SPCD_BANNER_VERTICAL="│" -spcd_banner() { - spcd_banner_unset - spcd_banner_add_index - spcd_banner_add "S" - # - for spcd_banner__item in "${SPCD_STEP_TEXT}" "${SPCD_SUBSTEP_TEXT}"; do - if [ -n "${spcd_banner__item}" ]; then - spcd_banner_add "${spcd_banner__item}" - fi - done - # - spcd_banner_close - spcd_banner_echo - spcd_banner_unset -} - spcd_banner_add() { if [ -n "${1}" ]; then spcd_ba__text=" ${1} " @@ -1195,6 +1179,22 @@ spcd_banner_open() { "${SPCD_BANNER_UP_AND_RIGHT}" } +spcd_banner_render() { + spcd_banner_unset + spcd_banner_add_index + spcd_banner_add "S" + # + for spcd_banner__item in "${SPCD_STEP_TEXT}" "${SPCD_SUBSTEP_TEXT}"; do + if [ -n "${spcd_banner__item}" ]; then + spcd_banner_add "${spcd_banner__item}" + fi + done + # + spcd_banner_close + spcd_banner_echo + spcd_banner_unset +} + spcd_banner_split() { spcd_banner_append \ "${SPCD_BANNER_DOWN_AND_HORIZONTAL}" \