Created
February 26, 2011 13:52
-
-
Save hyagni/845213 to your computer and use it in GitHub Desktop.
On Ubuntu, use trash instead of rm/rmdir. trash is part of trash-cli.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; use trash for remove files | |
(defun my-trash-file (FILENAME) | |
(call-process-shell-command (concat "trash " FILENAME) | |
nil 0)) | |
;; call-process-shell-command doesnt wait, with BUFFER 0 | |
(defalias 'delete-file 'my-trash-file) | |
(defalias 'delete-directory 'my-trash-file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment