leave

Crates.ioleave
lib.rsleave
version0.1.0
created_at2025-11-30 02:05:39.067704+00
updated_at2025-11-30 02:05:39.067704+00
descriptionInverted rm(1) command - Remove everything except the given files
homepage
repositoryhttps://github.com/kdkasad/leave
max_upload_size
id1957745
size76,399
Kian Kasad (kdkasad)

documentation

README

leave — Inverted rm(1) command

GitHub Actions Workflow Status bagde Codecov badge License badge

leave is an inverted rm command. It removes everything in the current directory except the files given as arguments.

Example:

$ ls
main.rs other.rs test.rs
$ leave main.rs
$ ls
main.rs

Install

Install from Git sources using Cargo:

$ cargo install --git https://github.com/kdkasad/leave

Usage

$ leave --help
Usage: leave [OPTIONS] [FILES]...

Arguments:
  [FILES]...  Files to leave present

Options:
  -C, --chdir <DIR>  Run as if started in <DIR>
  -r, --recursive    Recursively delete directories and their contents
  -d, --dirs         Delete empty directories
  -f, --force        Don't check for arguments that are likely to be mistakes
  -h, --help         Print help
  -V, --version      Print version

License

Copyright (C) 2025 Kian Kasad (@kdkasad)

Leave is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Leave is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Leave. If not, see https://www.gnu.org/licenses/.

Commit count: 0

cargo fmt