parent
b8f5e00296
commit
42189dd171
1 changed files with 5 additions and 9 deletions
14
cd.sh
14
cd.sh
|
@ -592,9 +592,6 @@ ${CD_GIT_CHILD}
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
cd_box_more () {
|
|
||||||
echo "${CD_BOX_VERTICAL} ${@}"
|
|
||||||
}
|
|
||||||
cd_box_open () {
|
cd_box_open () {
|
||||||
echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}"
|
echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}"
|
||||||
}
|
}
|
||||||
|
@ -603,9 +600,10 @@ cd_box_shut () {
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_cat () {
|
cd_cat () {
|
||||||
if [ "${1}" ] ; then
|
if [ -f "${1}" ] ; then
|
||||||
echo "${CD_BOX_DOWN}${CD_BOX_LEFT}$(realpath "${1}")"
|
cd_box_open "${1}"
|
||||||
cat "${1}" || exit
|
cat "${1}" || exit
|
||||||
|
cd_box_shut "${1}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -654,12 +652,10 @@ local command="${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_ls () {
|
cd_ls () {
|
||||||
local path
|
|
||||||
if [ -d "${1}" ] ; then
|
if [ -d "${1}" ] ; then
|
||||||
path="$(realpath "${1}")"
|
cd_box_open "${1}"
|
||||||
cd_box_open "${split}"
|
|
||||||
ls -a -l "${1}" || exit
|
ls -a -l "${1}" || exit
|
||||||
cd_box_shut "${split}"
|
cd_box_shut "${1}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue