From 2fa331302cb0ac4dde26337ec73ff008ec9b4016 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 4 Jun 2024 18:46:38 +0200 Subject: [PATCH] box/down,left --- cd.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cd.sh b/cd.sh index e46fdb5..c8169cb 100644 --- a/cd.sh +++ b/cd.sh @@ -594,7 +594,7 @@ ${CD_GIT_CHILD} cd_cat () { if [ "${1}" ] ; then - echo "╭╴$(realpath "${1}")" + echo "${CD_BOX_DOWN}${CD_BOX_LEFT}$(realpath "${1}")" cat "${1}" || exit fi } @@ -645,7 +645,7 @@ local command="${1}" cd_ls () { if [ "${1}" ] ; then - echo "╭╴$(realpath "${1}")" + echo "${CD_BOX_DOWN}${CD_BOX_LEFT}$(realpath "${1}")" ls -a -l "${1}" || exit fi } @@ -695,7 +695,7 @@ cd_split () { cd_step () { CD_STEP=$((CD_STEP+1)) echo -n "\ -╭${CD_SPLIT} +${CD_BOX_DOWN}${CD_SPLIT} │ ${CD_STEP} ${@} ╰${CD_SPLIT} " @@ -714,6 +714,9 @@ local text="${2}" # constants +CD_BOX_DOWN="╭" +CD_BOX_LEFT="╴" + CD_ERROR_CI=2 CD_ERROR_OS=1