Git Product home page Git Product logo

crap's Introduction

rm files without fear

Why?

Ever rmed a file and instantly regretted it? Fear not, for crap is here.

How?

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 ~/.local/share/Trash.

And obviously, this works only on Linux.

Installation

$ nimble install crap

or download the binary from the Releases page.

Tip

Alias crap to rm in your .bashrc/.zshrc. But that's kinda the point.

Usage

$ crap foo.png

$ crap *.png

$ crap a.pdf b.jpg c.mp4

Aaannddd it'll show up in your file manager's Trash.

trash

API

This package exposes a single proc: crap(path: var string)

import crap

crap("~/Pictures/*")

TODO

  • support multiple files
  • trashing dirs
  • support for other OSs (idk maybe)

Prior art

Contributing

Bad code? New feature in mind? Open an issue. Better still, learn Nim and shoot a PR โœจ

License

MIT ยฉ Anirudh Oppiliappan

crap's People

Contributors

nemya9066 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

xrisk nemya9066

crap's Issues

How did you get the shadow on the screenshot?

I really like the MacOS like drop down shadow that you have on the screenshot of your file manager. How did you do that? I checked your dotfiles but couldnt find anything which added the shadow to your screenshot.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.