Change rm command to use -- option for safety

This commit is contained in:
daniel0alves
2026-01-14 11:26:35 +00:00
committed by GitHub
parent a5c61d9ab0
commit 1c3c255ab6
+2 -2
View File
@@ -45,7 +45,7 @@ function delete_targets(){
printf "${STY_YELLOW}Target \"$path\" inexists, skipping...${STY_RST}\n"
continue
elif [[ "$path" == "$HOME"* ]]; then
x rm -r "$path"
x rm -- "$path"
else
while true; do
printf "WARNING: Target \"$path\" is not under \$HOME. Still delete it?\ny=Yes, delete it;\nn=No, skip this one\n"
@@ -53,7 +53,7 @@ function delete_targets(){
echo
case "$ans" in
y|Y)
x rm -r "$path"
x rm -- "$path"
break 1
;;
n|N)