summary refs log tree commit diff
path: root/bin/rm
diff options
context:
space:
mode:
Diffstat (limited to 'bin/rm')
-rwxr-xr-xbin/rm10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/rm b/bin/rm
index f3a604c..b164647 100755
--- a/bin/rm
+++ b/bin/rm
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-if [ ! -t 1 ]; then
+if [ ! -t 1 ] || [ -n "$UNSAFE_RM" ]; then
 	# shellcheck disable=SC2068
-	exec /bin/rm $@
+	exec /bin/rm "$@"
 fi
 
 # stop me from being stupid
@@ -20,7 +20,7 @@ done
 
 if [ -n "${force}" ] && [ -n "${recurse}" ]; then
 	tput setaf 1
-	ls -l "${!OPTIND}" >&2
+	exa --color=never -a "${!OPTIND}" >&2
 	echo "!"
 	echo "! recursive force not allowed" >&2
 	echo "!"
@@ -30,9 +30,9 @@ fi
 
 if [ -n "${recurse}" ]; then
 	tput setaf 1
-	ls -l "${!OPTIND}" >&2
+	exa --color=never -a "${!OPTIND}" >&2
 	tput sgr0
 fi
 
 # shellcheck disable=SC2068
-exec /bin/rm -I --one-file-system $@
+exec /bin/rm -I --one-file-system "$@"