# replace rm with mv
TRASH=$HOME/.Trash
mkdir -p $TRASH
function rm() {
# rm: move to $TRASH
command mv -f --backup=numbered "$@" $TRASH
}
function rmls() {
# rm list: list all the removed items in $TRASH
command ls -al --color=auto $TRASH
}
function rmud() {
# rm undo: put back an item from $TRASH to current directory
command mv "$TRASH/$@" .
}
function rmrm() {
# rm rm: empty $TRASH
command read -p "Do you want to empty $red$HOME/.Trash$reset now? [y/n]" confirm
if [ "$confirm" = "y" ] || [ "$confirm" = "Y" ]; then
command rm -rf $TRASH && mkdir -p $TRASH
command echo "Trash emptied."
else
command echo "Empty trash cancelled."
fi
}