step/in,out,wipe

This commit is contained in:
Marc Beninca 2024-08-25 15:15:21 +02:00
parent c39a9ba887
commit 195130b14e
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -871,17 +871,19 @@ ${SPCD_PYTHON_ALIAS} / ${spcd_stp__name}"
# ╰───────────┴──────╯ # ╰───────────┴──────╯
spcd_step() { spcd_step() {
SPCD_STEP=$((SPCD_STEP + 1)) if [ -n "${1}" ]; then
SPCD_STEP_TEXT="${*}" eval "SPCD_STEP_${SPCD_STEP}=\"${1}\""
unset SPCD_SUBSTEP SPCD_SUBSTEP_TEXT spcd_banner
spcd_banner fi
} }
spcd_step_in() { spcd_step_in() {
SPCD_STEP=$((SPCD_STEP + 1)) SPCD_STEP=$((SPCD_STEP + 1))
spcd_step_wipe
} }
spcd_step_out() { spcd_step_out() {
spcd_step_wipe
SPCD_STEP=$((SPCD_STEP - 1)) SPCD_STEP=$((SPCD_STEP - 1))
} }
@ -1195,6 +1197,10 @@ spcd_banner_unset() {
SPCD_STEP=1 SPCD_STEP=1
spcd_step_wipe() {
eval "unset SPCD_STEP_${SPCD_STEP}"
}
# ╭──────────╮ # ╭──────────╮
# │ internal │ # │ internal │
# ╰──────────╯ # ╰──────────╯