diff --git a/cd.sh b/cd.sh index b9a54ac..b7b74cb 100644 --- a/cd.sh +++ b/cd.sh @@ -592,9 +592,6 @@ ${CD_GIT_CHILD} # functions -cd_box_more () { - echo "${CD_BOX_VERTICAL} ${@}" -} cd_box_open () { echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}" } @@ -603,9 +600,10 @@ cd_box_shut () { } cd_cat () { - if [ "${1}" ] ; then - echo "${CD_BOX_DOWN}${CD_BOX_LEFT}$(realpath "${1}")" + if [ -f "${1}" ] ; then + cd_box_open "${1}" cat "${1}" || exit + cd_box_shut "${1}" fi } @@ -654,12 +652,10 @@ local command="${1}" } cd_ls () { -local path if [ -d "${1}" ] ; then - path="$(realpath "${1}")" - cd_box_open "${split}" + cd_box_open "${1}" ls -a -l "${1}" || exit - cd_box_shut "${split}" + cd_box_shut "${1}" fi }