spcd_banner
This commit is contained in:
parent
f3d5b5c464
commit
1c1813148b
1 changed files with 21 additions and 8 deletions
29
spcd/main.sh
29
spcd/main.sh
|
@ -827,6 +827,23 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
|
|||
|
||||
# functions
|
||||
|
||||
spcd_banner() {
|
||||
unset SPCD_BANNER_1 SPCD_BANNER_2 SPCD_BANNER_3
|
||||
spcd_banner_add_123 "${SPCD_DOWN}" "${SPCD_VERT}" "${SPCD___UP}"
|
||||
#
|
||||
spcd_banner__index="${SPCD_STEP}"
|
||||
[ -n "${SPCD_SUBSTEP}" ] &&
|
||||
spcd_banner__index="${spcd_banner__index}.${SPCD_SUBSTEP}"
|
||||
spcd_banner_add "${spcd_banner__index}"
|
||||
#
|
||||
for spcd_banner__item in "${SPCD_STEP_TEXT}" "${SPCD_SUBSTEP_TEXT}"; do
|
||||
spcd_banner_add_123 "┬" "${SPCD_VERT}" "┴"
|
||||
spcd_banner_add "${spcd_banner__item}"
|
||||
done
|
||||
#
|
||||
spcd_banner_add_123 "╮" "${SPCD_VERT}" "╯"
|
||||
}
|
||||
|
||||
spcd_banner_add() {
|
||||
if [ -n "${1}" ]; then
|
||||
spcd_ba__text=" ${1} "
|
||||
|
@ -1002,18 +1019,14 @@ spcd_split() {
|
|||
spcd_step() {
|
||||
SPCD_STEP=$((SPCD_STEP + 1))
|
||||
SPCD_STEP_TEXT="${*}"
|
||||
unset SPCD_SUBSTEP
|
||||
spcd_banner "${SPCD_STEP}" "${SPCD_VERT}" "${SPCD_STEP_TEXT}"
|
||||
unset SPCD_SUBSTEP SPCD_SUBSTEP_TEXT
|
||||
spcd_banner
|
||||
}
|
||||
|
||||
spcd_substep() {
|
||||
SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1))
|
||||
spcd_banner \
|
||||
"${SPCD_STEP}.${SPCD_SUBSTEP}" \
|
||||
"${SPCD_VERT}" \
|
||||
"${SPCD_STEP_TEXT}" \
|
||||
"${SPCD_VERT}" \
|
||||
"${*}"
|
||||
SPCD_SUBSTEP_TEXT="${*}"
|
||||
spcd_banner
|
||||
}
|
||||
|
||||
spcd_write() {
|
||||
|
|
Loading…
Reference in a new issue