cd_rm
This commit is contained in:
parent
1100cf4234
commit
571497c5cf
1 changed files with 4 additions and 6 deletions
10
cd.sh
10
cd.sh
|
@ -678,17 +678,16 @@ cd_openssl () {
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_rm () {
|
cd_rm () {
|
||||||
local path="${1}"
|
cd_rm__path="${1}"
|
||||||
if [ -e "${path}" ] ; then
|
if [ -e "${cd_rm__path}" ] ; then
|
||||||
echo "← ${path}"
|
echo "← ${cd_rm__path}"
|
||||||
rm -r "${path}" || exit
|
rm -r "${cd_rm__path}" || exit
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
cd_sed () {
|
cd_sed () {
|
||||||
cd_sed__file="${1}"
|
cd_sed__file="${1}"
|
||||||
shift
|
shift
|
||||||
#
|
|
||||||
if [ -f "${cd_sed__file}" ] ; then
|
if [ -f "${cd_sed__file}" ] ; then
|
||||||
cd_cat "${cd_sed__file}"
|
cd_cat "${cd_sed__file}"
|
||||||
for cd_sed__regex in "${@}" ; do
|
for cd_sed__regex in "${@}" ; do
|
||||||
|
@ -718,7 +717,6 @@ ${CD___UP}"
|
||||||
cd_write () {
|
cd_write () {
|
||||||
cd_write__file="${1}"
|
cd_write__file="${1}"
|
||||||
cd_write__text="${2}"
|
cd_write__text="${2}"
|
||||||
#
|
|
||||||
if [ "${cd_write__file}" ] ; then
|
if [ "${cd_write__file}" ] ; then
|
||||||
[ -f "${cd_write__file}" ] && cd_cat "${cd_write__file}"
|
[ -f "${cd_write__file}" ] && cd_cat "${cd_write__file}"
|
||||||
echo "→ ${cd_write__file}"
|
echo "→ ${cd_write__file}"
|
||||||
|
|
Loading…
Reference in a new issue