rn: Support $HOME with spaces.

This commit is contained in:
Ole Tange 2020-10-26 20:04:10 +01:00
parent 28e9986059
commit fb1c5b18ce

6
rn/rn
View file

@ -57,8 +57,8 @@ find_rm_dir() {
echo "$1"/.rm echo "$1"/.rm
return 0 return 0
else else
if [ "/" == $(readlink -f "$dir") ]; then if [ "/" == "$(readlink -f "$dir")" ]; then
echo $HOME/.rm echo "$HOME"/.rm
return 0 return 0
fi fi
find_rm_dir "../$dir" find_rm_dir "../$dir"
@ -68,4 +68,4 @@ find_rm_dir() {
rmdir="$(find_rm_dir .)" rmdir="$(find_rm_dir .)"
mkdir -p "$rmdir" mkdir -p "$rmdir"
mv --backup=numbered "$@" $rmdir mv --backup=numbered "$@" "$rmdir"