From e77881a72b735ca12aa055054656afdfbd6a8fc8 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Thu, 29 Jul 2021 23:45:43 +0200 Subject: bin: format scripts --- bin/rm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bin/rm') 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 "$@" -- cgit 1.4.1