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
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue