diff options
| author | Robert Günzler <r@gnzler.io> | 2021-07-29 23:45:43 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-07-29 23:48:28 +0200 |
| commit | e77881a72b735ca12aa055054656afdfbd6a8fc8 (patch) | |
| tree | 53ed4778acca18f55141e4efbdc0a841b64116a5 /bin/rm | |
| parent | 3079e935c793a9aa1831fd165e28636eb7a87dae (diff) | |
bin: format scripts
Diffstat (limited to 'bin/rm')
| -rwxr-xr-x | bin/rm | 10 |
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 "$@" |