Show HN: rm-safely – A shell alias that moves files to trash instead of deleting
github.comI made rm-safely, a simple shell wrapper that moves files to trash instead of permanently deleting them. It prevents accidental deletions from autocomplete mishaps or hasty rm -rf commands.
Should work as a drop-in replacement for rm but safer.
Would appreciate any feedback!
This moves files to the actual OS system trash/recycle bin: https://www.npmjs.com/package/trash-cli
- Working great on MacOS!
- For some reason the latest versions occasionally didn't work on Windows 11. (I forgot the actual reason...)
I aliased rm=trash and RM=rm so I could still access the real rm when needed.
[dead]