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
|
# 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() {
|
spcd_banner_add() {
|
||||||
if [ -n "${1}" ]; then
|
if [ -n "${1}" ]; then
|
||||||
spcd_ba__text=" ${1} "
|
spcd_ba__text=" ${1} "
|
||||||
|
@ -1002,18 +1019,14 @@ spcd_split() {
|
||||||
spcd_step() {
|
spcd_step() {
|
||||||
SPCD_STEP=$((SPCD_STEP + 1))
|
SPCD_STEP=$((SPCD_STEP + 1))
|
||||||
SPCD_STEP_TEXT="${*}"
|
SPCD_STEP_TEXT="${*}"
|
||||||
unset SPCD_SUBSTEP
|
unset SPCD_SUBSTEP SPCD_SUBSTEP_TEXT
|
||||||
spcd_banner "${SPCD_STEP}" "${SPCD_VERT}" "${SPCD_STEP_TEXT}"
|
spcd_banner
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_substep() {
|
spcd_substep() {
|
||||||
SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1))
|
SPCD_SUBSTEP=$((SPCD_SUBSTEP + 1))
|
||||||
spcd_banner \
|
SPCD_SUBSTEP_TEXT="${*}"
|
||||||
"${SPCD_STEP}.${SPCD_SUBSTEP}" \
|
spcd_banner
|
||||||
"${SPCD_VERT}" \
|
|
||||||
"${SPCD_STEP_TEXT}" \
|
|
||||||
"${SPCD_VERT}" \
|
|
||||||
"${*}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
spcd_write() {
|
spcd_write() {
|
||||||
|
|
Loading…
Reference in a new issue