[utility] fix safe-rm alias
Alternative approach to determine if aliasing safe-rm is viable. If safe-rmdir is available, the OS is Suse (which has it's own safe-rm). Note to Suse: you're making problems for me. Stop. Closes #27
This commit is contained in:
parent
5ff931065f
commit
474715170b
@ -92,11 +92,9 @@ if [[ ${OSTYPE} == linux* ]]; then
|
||||
fi
|
||||
|
||||
# not aliasing rm -i, but if safe-rm is available, use condom.
|
||||
if (( ${+commands[safe-rm]} )); then
|
||||
# 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
|
||||
# if safe-rmdir is available, the OS is suse which has its own terrible 'safe-rm' which is not what we want
|
||||
if (( ${+commands[safe-rm]} )) && (( ! ${+commands[safe-rmdir]} )); then
|
||||
alias rm='safe-rm'
|
||||
fi
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user