GitShow/sindresorhus/macos-trash
sindresorhus

macos-trash

Move files and folders to the trash

by sindresorhus
macosswift-packagetrash
Star on GitHubFork

Swift

442 stars22 forks7 contributorsQuiet · 4mo agoSince 2015v3.0.0MIT

Meet the team

See all 7 on GitHub →
sindresorhus
sindresorhus32 contributions
vladimyr
vladimyr1 contribution
heilerich
heilerich1 contribution
lgarron
lgarron1 contribution
gingerbeardman
gingerbeardman1 contribution
y-vectorfield
y-vectorfield1 contribution
kaichaosun
kaichaosun1 contribution

Languages

View on GitHub →
Swift97.9%
Shell2.1%

Commit activity

Last 12 weeks · 0 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 →
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 · 4mo ago
sindresorhus
`Put back` only works for the first fileClosedIssue

Continued from https://github.com/sindresorhus/trash/issues/24. This is a really weird issue. Only the first file trashed with in a process will have the ability to from the trash. I've narrowed down the code and the below still only adds for the first file : I'm starting to think this is a OS X bug. Would appriciate being proved wrong, though. Gonna open an issue on radar when I get a chance, unless someone can figure this out.

sindresorhus · 4mo ago
mafintosh
Support for "Put Back"ClosedIssue

This module is awesome. Was thinking about writing something like this yesterday and then I saw you already did it which is even better. Is there anyway to "untrash" a file from the command line? Like:

mafintosh · 4mo ago
Structured data for AI agents

Repository: sindresorhus/macos-trash. Description: Move files and folders to the trash Stars: 442, Forks: 22. Primary language: Swift. Languages: Swift (97.9%), Shell (2.1%). License: MIT. Topics: macos, swift-package, trash. Latest release: v3.0.0 (4mo ago). Open PRs: 0, open issues: 1. Last activity: 4mo ago. Community health: 71%. Top contributors: sindresorhus, vladimyr, heilerich, lgarron, gingerbeardman, y-vectorfield, kaichaosun.

·@ofershap

Replace github.com with gitshow.dev