After discovering 'trash-put', I would like to condition myself to use it instead of 'rm' in most cases. If I just alias it that may make me feel too safe on machines without my config files though, so I came up with the following (in my .zshrc):
function rm() {
local go_ahead
read -q "go_ahead?Are you sure you don't want to use rms? (y/n)"
echo ""
if [[ "$go_ahead" == "y" ]]; then
/bin/rm $*
fi
}
alias rms='trash-put'
It seems to work, but I don't have a lot of experience with zsh scripting... is this a good way to do what I want?
Thanks Peter