rmfiles without fear
rmed a file and instantly regretted it? Fear not, for
crap is here.
crap follows the FreeDesktop.org Trash spec. So instead of perma-deleting your file,
crap moves it to the
$XDG_DATA_HOME/Trash folder. If this environment variable isn't set, it defaults to
And obviously, this works only on Linux.
$ nimble install crap
or download the binary from the Releases page.
rm in your
.zshrc. But that's kinda the point.
$ crap foo.png $ crap *.png $ crap a.pdf b.jpg c.mp4
Aaannddd it'll show up in your file manager's Trash.
This package exposes a single proc:
crap(path: var string)
import crap crap("~/Pictures/*")
- support multiple files
- trashing dirs
- support for other OSs (idk maybe)
Bad code? New feature in mind? Open an issue. Better still, learn Nim and shoot a PR
MIT © Anirudh Oppiliappan