From bb680b3742fdd5555c91471bda1475fa376c87b3 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Sat, 23 Jan 2016 03:10:55 -0500 Subject: [PATCH] [utility] fix safe-rm condom on opensuse --- modules/utility/init.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/utility/init.zsh b/modules/utility/init.zsh index 64e3a3b..0e09ba8 100644 --- a/modules/utility/init.zsh +++ b/modules/utility/init.zsh @@ -91,7 +91,10 @@ alias chown='chown --preserve-root -v' # not aliasing rm -i, but if safe-rm is available, use condom. if (( ${+commands[safe-rm]} )); then - alias rm='safe-rm' + # check that it's the condom safe-rm, not the 'abs path' safe-rm + if [[ $(file =safe-rm | grep 'perl') ]]; then + alias rm='safe-rm' + fi fi