box/horizontal,vertical

This commit is contained in:
Marc Beninca 2024-06-04 18:51:15 +02:00
parent 2fa331302c
commit 461c798983
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

12
cd.sh
View file

@ -688,16 +688,16 @@ shift
cd_split () { cd_split () {
echo -n "\ echo -n "\
${CD_SPLIT} ${CD_BOX_HORIZONTAL}
" "
} }
cd_step () { cd_step () {
CD_STEP=$((CD_STEP+1)) CD_STEP=$((CD_STEP+1))
echo -n "\ echo -n "\
${CD_BOX_DOWN}${CD_SPLIT} ${CD_BOX_DOWN}${CD_BOX_HORIZONTAL}
${CD_STEP} ${@} ${CD_BOX_VERTICAL} ${CD_STEP} ${@}
${CD_SPLIT} ${CD_BOX_HORIZONTAL}
" "
} }
@ -715,7 +715,9 @@ local text="${2}"
# constants # constants
CD_BOX_DOWN="╭" CD_BOX_DOWN="╭"
CD_BOX_HORIZONTAL="─╌╌┄┄┈┈"
CD_BOX_LEFT="╴" CD_BOX_LEFT="╴"
CD_BOX_VERTICAL="│"
CD_ERROR_CI=2 CD_ERROR_CI=2
CD_ERROR_OS=1 CD_ERROR_OS=1
@ -733,7 +735,5 @@ CD_PM_APT="apt"
CD_PM_DNF="dnf" CD_PM_DNF="dnf"
CD_PM_PACMAN="pacman" CD_PM_PACMAN="pacman"
CD_SPLIT="─╌╌┄┄┈┈"
# run # run
cd_main "${@}" cd_main "${@}"