#allowlist #rm #command-line-tool

app sanitize

一个简单的命令行工具,用于对目录进行清理

1 个不稳定版本

0.1.0 2023年2月5日

#9#allowlist

Apache-2.0

20KB
535

GitHub release (latest by date) Test with Code Coverage Check and Lint Coverage Status

sanitize

一个简单的命令行工具,用于将目录清理到特定的白名单中,用 Rust 编写。

安装

cargo install sanitize 或者,对于 tea 用户,tea +crates.io/sanitize true

用法

由于使用了 clap,帮助系统从实现中流畅地生成

A simple command line tool for sanitizing a directory

Usage: sanitize [OPTIONS] [path]

Arguments:
  [path]  the directory to sanitize

Options:
  -f, --file <file>  the entries to keep, one per line
                     if not passed, will use stdin
                     format is the same as .*ignore files
  -n, --dry-run      don't actually delete anything
  -y, --yes          don't ask for confirmation (dangerous, but very, very useful)
      --unsafe       allow unsafe operation (sanitize $HOME)
  -v, --verbose...   increase verbosity (can be used multiple times)
  -h, --help         Print help
  -V, --version      Print version

依赖

~5–15MB
~159K SLoC