box,ls
This commit is contained in:
parent
1c45fd6ff6
commit
768ebd4756
1 changed files with 15 additions and 2 deletions
17
cd.sh
17
cd.sh
|
@ -592,6 +592,16 @@ ${CD_GIT_CHILD}
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
|
cd_box_more () {
|
||||||
|
echo "${CD_BOX_VERTICAL} ${@}"
|
||||||
|
}
|
||||||
|
cd_box_open () {
|
||||||
|
echo "${CD_BOX_DOWN}${CD_BOX_LEFT} ${@}"
|
||||||
|
}
|
||||||
|
cd_box_shut () {
|
||||||
|
echo "${CD_BOX_UP}${CD_BOX_LEFT} ${@}"
|
||||||
|
}
|
||||||
|
|
||||||
cd_cat () {
|
cd_cat () {
|
||||||
if [ "${1}" ] ; then
|
if [ "${1}" ] ; then
|
||||||
echo "${CD_BOX_DOWN}${CD_BOX_LEFT}$(realpath "${1}")"
|
echo "${CD_BOX_DOWN}${CD_BOX_LEFT}$(realpath "${1}")"
|
||||||
|
@ -644,9 +654,12 @@ local command="${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_ls () {
|
cd_ls () {
|
||||||
if [ "${1}" ] ; then
|
local path
|
||||||
echo "${CD_BOX_DOWN}${CD_BOX_LEFT}$(realpath "${1}")"
|
if [ -d "${1}" ] ; then
|
||||||
|
path="$(realpath "${1}")"
|
||||||
|
cd_box_open "${split}"
|
||||||
ls -a -l "${1}" || exit
|
ls -a -l "${1}" || exit
|
||||||
|
cd_box_shut "${split}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue