_/level
This commit is contained in:
parent
54cbb59542
commit
95a1c81f39
1 changed files with 6 additions and 6 deletions
|
@ -199,12 +199,12 @@ _SPCD_RULE_RIGHT="╴"
|
|||
# │ internal │ step │
|
||||
# ╰──────────┴──────╯
|
||||
|
||||
SPCD_STEP_LEVEL=1
|
||||
_SPCD_STEP_LEVEL=1
|
||||
|
||||
spcd_step_wipe() {
|
||||
unset \
|
||||
"SPCD_STEP_${SPCD_STEP_LEVEL}_INDEX" \
|
||||
"SPCD_STEP_${SPCD_STEP_LEVEL}_LABEL"
|
||||
"SPCD_STEP_${_SPCD_STEP_LEVEL}_INDEX" \
|
||||
"SPCD_STEP_${_SPCD_STEP_LEVEL}_LABEL"
|
||||
}
|
||||
|
||||
#╶──────────────────────────────────────╴
|
||||
|
@ -371,7 +371,7 @@ spcd_split() {
|
|||
|
||||
spcd_step() {
|
||||
if [ -n "${1}" ]; then
|
||||
spcd_step__prefix="SPCD_STEP_${SPCD_STEP_LEVEL}"
|
||||
spcd_step__prefix="SPCD_STEP_${_SPCD_STEP_LEVEL}"
|
||||
spcd_step__index="${spcd_step__prefix}_INDEX"
|
||||
eval "${spcd_step__index}=\$((${spcd_step__index} + 1))"
|
||||
eval "${spcd_step__prefix}_LABEL=\"${1}\""
|
||||
|
@ -381,13 +381,13 @@ spcd_step() {
|
|||
|
||||
spcd_step_in() {
|
||||
[ -n "${1}" ] && spcd_step "${1}"
|
||||
SPCD_STEP_LEVEL=$((SPCD_STEP_LEVEL + 1))
|
||||
_SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL + 1))
|
||||
spcd_step_wipe
|
||||
}
|
||||
|
||||
spcd_step_out() {
|
||||
spcd_step_wipe
|
||||
SPCD_STEP_LEVEL=$((SPCD_STEP_LEVEL - 1))
|
||||
_SPCD_STEP_LEVEL=$((_SPCD_STEP_LEVEL - 1))
|
||||
}
|
||||
|
||||
#╶──────────────────────────────────────╴
|
||||
|
|
Loading…
Reference in a new issue