Skip to content

Instantly share code, notes, and snippets.

@hanks
Created May 17, 2014 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hanks/48d4a5cbe5eb674ee914 to your computer and use it in GitHub Desktop.
Save hanks/48d4a5cbe5eb674ee914 to your computer and use it in GitHub Desktop.
protect rm command alais
# replace rm command with mv to Trash to protect remove files or directory miss
function __protect_rm {
mv ${@: -1} ~/.Trash #get last function argument
}
alias rm='__protect_rm'
@joaoantoniocardoso
Copy link

Than any suggestions for how should I actually erase the trash?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment