Trash is a small OSX utility that moves files and folders to the trash instead of deleting them immediately.
To install it, simply run:
brew install trash
Then add this to your
From there onwards, every time you type rm things will go to your trash.
One nice benefit of using trash is that you don't need to pass the
for deleting folders.
Or if you are using the alias:
PS: At times, trash might fail to delete some files. Just use
\rm to bypass
\rm -rf my-folder