box/down,left

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

9
cd.sh
View file

@ -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