I want to write an alias for the dangerous /bin/rm , which forces copy to ~/.Trash , followed by force remove
It should by preference work on files,directories,wildcards.
I tried in .zshrc this but it does not work correctly.
I thought maybe I could use rsync ?
Feel free ...
It should by preference work on files,directories,wildcards.
I tried in .zshrc this but it does not work correctly.
Code:
alias rm='echo "rm is disabled use remove instead"'
alias remove='cp -vf -- $1 ~/.Trash; /bin/rm -ivf -- $1'
Feel free ...