From 9eb9e69934fa7bc1a7ba60b9788228e9ac6d34f6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 23 Aug 2024 22:48:07 +0200 Subject: [PATCH] spcd_banner_add --- spcd/main.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index 362d414..7b829c6 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -827,11 +827,15 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}" # functions -spcd_banner() { - echo "\ -${SPCD_DOWN} -${SPCD_VERT} ${*} -${SPCD___UP}" +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_1="${SPCD_BANNER_1}${spcd_ba__filler}" + SPCD_BANNER_2="${SPCD_BANNER_2}${spcd_ba__text}" + SPCD_BANNER_3="${SPCD_BANNER_3}${spcd_ba__filler}" + fi } spcd_cat() {