GitShow/sindresorhus/trash-cli
sindresorhus

trash-cli

Move files and folders to the trash

by sindresorhus
Star on GitHubForknpm

JavaScript

1.4k stars39 forks5 contributorsQuiet · 5mo agoSince 2015v7.2.0MIT

Meet the team

See all 5 on GitHub →
sindresorhus
sindresorhus43 contributions
jv-k
jv-k1 contribution
MoOx
MoOx1 contribution
Richienb
Richienb1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

4 of 6 standards met

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

Recent fixes

View closed PRs →
wclr
--dot not supported?ClosedIssue

Seem option not supported yet?

wclr · 5mo ago
solrevdev
Directories are silently ignored (not trashed) due to globby onlyFiles defaultClosedIssue

Description silently fails to trash directories. The command returns exit code 0 but nothing is moved to trash. Steps to Reproduce ```bash mkdir test-folder echo "test" > test-folder/test.txt trash test-folder ls test-folder # folder still exists With --verbose, no output is produced either: trash -v test-folder (no output, folder still exists) Expected Behavior The directory should be moved to the trash. Actual Behavior The directory is silently ignored. Exit code is 0, no error message, no verbose output. Root Cause In cli.js line 49: const files = await globby(cli.input, {expandDirectories: false}); globby defaults to onlyFiles: true, which excludes directories from the results. When a directory path is passed, globby returns an empty array, so nothing gets trashed. Fix Add onlyFiles: false to the globby options: const files = await globby(cli.input, {expandDirectories: false, onlyFiles: false}); Environment trash-cli: 7.1.0 Node.js: v25.4.0 macOS: Tahoe 26.2 (25C56)

solrevdev · 5mo ago
karbassi
Verbose modeClosedIssue

It would be useful to have a flag for verbose mode. Usage

karbassi · 5mo ago
Structured data for AI agents

Repository: sindresorhus/trash-cli. Description: Move files and folders to the trash Stars: 1405, Forks: 39. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v7.2.0 (5mo ago). Open PRs: 0, open issues: 2. Last activity: 5mo ago. Community health: 85%. Top contributors: sindresorhus, jv-k, MoOx, Richienb.

·@ofershap

Replace github.com with gitshow.dev