GitShow/sindresorhus/macos-trash
sindresorhus

macos-trash

Move files and folders to the trash

by sindresorhus
macosswift-packagetrash
Star on GitHubFork

Swift

452 stars23 forks8 contributorsActive · 1w agoSince 2015v3.1.0MIT

Meet the team

See all 8 on GitHub →
sindresorhus
sindresorhus33 contributions
vladimyr
vladimyr1 contribution
heilerich
heilerich1 contribution
lgarron
lgarron1 contribution
gingerbeardman
gingerbeardman1 contribution
TyceHerrman
TyceHerrman1 contribution
y-vectorfield
y-vectorfield1 contribution
kaichaosun
kaichaosun1 contribution

Languages

View on GitHub →
Swift98.6%
Shell1.4%

Commit activity

Last 12 weeks · 2 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
71
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent fixes

View closed PRs →
y-vectorfield
Add `--empty` flagClosedIssue

In order to differentiate it from native trash commands, we should add --list(-l) and --clear(-cl) options. The --list(-l) option lists up the contents of trash box. The --clear(-cl) option empties the trash box.

y-vectorfield · 1w ago
TyceHerrman
Add `--empty` flagMergedPR

Adds the flag discussed in #28. It uses Finder through , matching the approach suggested in the issue. The command does not prompt or respect , and AppleScript failures are reported through the existing CLI error path. Fixes #28 Verification Valid and invalid AppleScript helper checks Help, version, and existing CLI regression checks Universal / release build

TyceHerrman · 1w ago
JayBrown
[BUG] trash moves files to wrong user when executing with elevated privilegesClosedIssue

Let's say we have a file owned by . Moving this to the currently logged-in user's trash works fine in Finder: you just have to enter your admin password. Problems arise when using instead: doesn't work, and that's probably OK, but a question nonetheless: is there a reason why doesn't work? what works fine is … but the file actually doesn't wind up in the the user's trash directory , as it does in Finder, but in . So it seems that the CLI is only checking which user is executing the command (), but not if that's also the same as the logged-in user, e.g. . If that's true, the CLI should determine the actual home folder of the executing user by running the equivalent of , and then use the trash directory of that user. This bug should be fixed, because users should be able to move non-writable files to their own trash, in the same way it's possible in the Finder.

JayBrown · 6mo ago
Structured data for AI agents

Repository: sindresorhus/macos-trash. Description: Move files and folders to the trash Stars: 452, Forks: 23. Primary language: Swift. Languages: Swift (98.6%), Shell (1.4%). License: MIT. Topics: macos, swift-package, trash. Latest release: v3.1.0 (1w ago). Open PRs: 0, open issues: 0. Last activity: 1w ago. Community health: 71%. Top contributors: sindresorhus, vladimyr, heilerich, lgarron, gingerbeardman, TyceHerrman, y-vectorfield, kaichaosun.

·@ofershap

Replace github.com with gitshow.dev