Compare commits
No commits in common. "2eb03cf86304c65c205a64e37256c4457dd34bfb" and "4be860e4cd88d1a6fbd9b221e655e5dd161ad42d" have entirely different histories.
2eb03cf863
...
4be860e4cd
1 changed files with 14 additions and 31 deletions
45
cd.sh
45
cd.sh
|
@ -575,28 +575,12 @@ cd_write_python_module () {
|
||||||
cd_write "${CD_PYTHON_PACKAGES}/env.py" "\
|
cd_write "${CD_PYTHON_PACKAGES}/env.py" "\
|
||||||
$(cd_echo CD_OS_ID CD_OS_VERSION)
|
$(cd_echo CD_OS_ID CD_OS_VERSION)
|
||||||
|
|
||||||
STEP = ${CD_STEP}
|
|
||||||
|
|
||||||
|
$(cd_echo CD_OPEN CD_SHUT)
|
||||||
|
|
||||||
def open(*arguments):
|
$(cd_echo CD_HORIZONTAL)
|
||||||
print('${CD_OPEN}', end=str())
|
|
||||||
print(*arguments, flush=True)
|
|
||||||
|
|
||||||
|
$(cd_echo CD_DOWN CD_SPLIT CD_UP)
|
||||||
def shut(*arguments):
|
|
||||||
print('${CD_SHUT}', end=str())
|
|
||||||
print(*arguments, flush=True)
|
|
||||||
|
|
||||||
|
|
||||||
def split():
|
|
||||||
print('${CD_SPLIT}', flush=True)
|
|
||||||
|
|
||||||
|
|
||||||
def step(*arguments):
|
|
||||||
STEP += 1
|
|
||||||
print('${CD_DOWN}')
|
|
||||||
print('${CD_BOX_VERTICAL}', STEP, *arguments)
|
|
||||||
print('${CD_UP}', flush=True)
|
|
||||||
"
|
"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,11 +599,18 @@ ${CD_GIT_CHILD}
|
||||||
|
|
||||||
# functions
|
# functions
|
||||||
|
|
||||||
|
cd_box_open () {
|
||||||
|
echo "${CD_OPEN}${@}"
|
||||||
|
}
|
||||||
|
cd_box_shut () {
|
||||||
|
echo "${CD_SHUT}${@}"
|
||||||
|
}
|
||||||
|
|
||||||
cd_cat () {
|
cd_cat () {
|
||||||
if [ -f "${1}" ] ; then
|
if [ -f "${1}" ] ; then
|
||||||
cd_open "${1}"
|
cd_box_open "${1}"
|
||||||
cat "${1}" || exit
|
cat "${1}" || exit
|
||||||
cd_shut "${1}"
|
cd_box_shut "${1}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -669,9 +660,9 @@ local command="${1}"
|
||||||
|
|
||||||
cd_ls () {
|
cd_ls () {
|
||||||
if [ -d "${1}" ] ; then
|
if [ -d "${1}" ] ; then
|
||||||
cd_open "${1}"
|
cd_box_open "${1}"
|
||||||
ls -a -l "${1}" || exit
|
ls -a -l "${1}" || exit
|
||||||
cd_shut "${1}"
|
cd_box_shut "${1}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -682,10 +673,6 @@ cd_mkdir () {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_open () {
|
|
||||||
echo "${CD_OPEN}${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd_openssl () {
|
cd_openssl () {
|
||||||
local file="${1}"
|
local file="${1}"
|
||||||
if [ -f "${file}" ] ; then
|
if [ -f "${file}" ] ; then
|
||||||
|
@ -715,10 +702,6 @@ shift
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_shut () {
|
|
||||||
echo "${CD_SHUT}${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
cd_split () {
|
cd_split () {
|
||||||
echo "${CD_SPLIT}"
|
echo "${CD_SPLIT}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue