Skip to content

ansilithic/rmdir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rmdir

Swift 6.0 macOS 14+ License: MIT

Drop-in rmdir replacement for macOS that moves directories to Trash instead of permanently deleting them.

How it works

rmdir delegates to /usr/bin/trash so every deletion is recoverable from the macOS Trash. Each argument is validated as an existing directory before trashing — non-directories and missing paths produce errors on stderr.

Install

brew install ansilithic/tap/rmdir

Or build from source (requires Xcode and macOS 14+):

make build && make install

Ensure /usr/local/bin appears before /usr/bin in $PATH to shadow the system rmdir.

Usage

rmdir [--] directory ...

Examples

# Move a directory to Trash
rmdir old-project/

# Multiple directories at once
rmdir dir1 dir2 dir3

# Handle directory names starting with -
rmdir -- -temp-dir

License

MIT

About

Safe rmdir for macOS — moves directories to Trash instead of permanent deletion. Drop-in Swift replacement for /usr/bin/rmdir.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors