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 () {
|
||||
local path="${1}"
|
||||
if [ -e "${path}" ] ; then
|
||||
echo "← ${path}"
|
||||
rm -r "${path}" || exit
|
||||
cd_rm__path="${1}"
|
||||
if [ -e "${cd_rm__path}" ] ; then
|
||||
echo "← ${cd_rm__path}"
|
||||
rm -r "${cd_rm__path}" || exit
|
||||
fi
|
||||
}
|
||||
|
||||
cd_sed () {
|
||||
cd_sed__file="${1}"
|
||||
shift
|
||||
#
|
||||
if [ -f "${cd_sed__file}" ] ; then
|
||||
cd_cat "${cd_sed__file}"
|
||||
for cd_sed__regex in "${@}" ; do
|
||||
|
@ -718,7 +717,6 @@ ${CD___UP}"
|
|||
cd_write () {
|
||||
cd_write__file="${1}"
|
||||
cd_write__text="${2}"
|
||||
#
|
||||
if [ "${cd_write__file}" ] ; then
|
||||
[ -f "${cd_write__file}" ] && cd_cat "${cd_write__file}"
|
||||
echo "→ ${cd_write__file}"
|
||||
|
|
Loading…
Reference in a new issue