Update2: You can also may want to look at idea #8217 to know some of the disadvantages of rm aliases
Sometimes when I run:
$ rm foo
I realize I didn’t mean it, so with this in my mind I made a little wrapper, now instead of removing my files, it sends them to the trash bin, it’s compatible with [nautilus|pcmanfm]. Example: If I run from a terminal $ rm img.png I can then go to the Trash carpet in Nautilus and restore it. If I delete it in Nautilus (by pressing the [Supr] button) I can open a terminal and type
$ rm -u img.png
If you want use the script, download it, move it to /usr/local/bin and add an alias to the ~/.bashrc file:
$ alias rm='rm_'
Hope it helps