MIT License

项目介绍

rushsteve1/trash-d 是一个托管在 GitHub 上的开源项目,主要使用 D 编写,采用 MIT License 许可证,目前获得 141 个 Star、5 次 Fork。

仓库全名
rushsteve1/trash-d
开源许可证
MIT License
Star 数
141
Fork 数
5
未关闭 Issue
1

README 摘要

trash-d Said like "trashed". A near drop-in replacement for rm that uses the FreeDesktop trash bin. Written in the D programming language using only D's Phobos standard library. Can be compiled with any recent D compiler including GCC, so trash-d should run on any NIX platform that GCC supports. ONLY LINUX AND BSD ARE CURRENTLY SUPPORTED! Windows won't work at all. Any POSIX and FreeDesktop compliant system should…

完整内容见 GitHub 原始 README 或本页 。

常见问题

trash-d 用什么语言开发?

主要使用 D 编写,采用 MIT License 许可证,目前有 141 个 Star。

trash-d 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 trash-d 的源码?

可以直接克隆仓库:git clone https://github.com/rushsteve1/trash-d.git,默认分支为 main;安装与运行步骤见仓库 README。

trash-d 最近还在维护吗?

仓库最近一次更新为 2025年12月28日,当前有 1 个未关闭 Issue;Star 数为 141,可作为社区活跃度的参考。

关于

A near drop-in replacement for rm that uses the trash bin. Written in D

描述取自 GitHub 官方 API,中文内容由 GitRead 中文社区 编辑团队整理。

简要分析

热度分
155
价值分
86
活跃状态
活跃

语言占比

D
Lua
Shell

Release

README

trash-d

License GitHub Workflow Status GitHub last commit (branch) GitHub tag (latest SemVer pre-release)

Said like “trashed”.

A near drop-in replacement for rm that uses the FreeDesktop trash bin. Written in the D programming language using only D’s Phobos standard library. Can be compiled with any recent D compiler including GCC, so trash-d should run on any *NIX platform that GCC supports.

ONLY LINUX AND BSD ARE CURRENTLY SUPPORTED!

Windows won’t work at all.

Any POSIX and FreeDesktop compliant system should work fine. For rarer *NIXs like Solaris or AIX, you’re on your own though. PRs for expanding support are very welcome!

MacOS is semi-supported. It builds and passes all tests on MacOS 13.1+ (and likely will on most earlier versions too). However it still uses the FreeDesktop trash bin which is not “native” to MacOS. Contributions to improve this would be appreciated!

You can install a pre-built statically-linked version (x86_64-linux) from the GitHub releases page

There are also several posts on the D forums about trash-d, if you want to give those a read.

Maintenance Status: Stable

trash-d is reasonably stable and feature complete, so updates might be slow. But it is still maintained and bug reports are welcome!

Installing

Packaging status

If there is a package for your OS you should use that. Otherwise simply drop the trash binary somewhere on your $PATH such as $HOME/.local/bin. from the releases page.

Optionally set alias rm=trash in your shell config to replace usages of rm with trash-d.

Usage

Using trash-d is the same as most other command line utilities, and intentionally very similar to rm.

See the manual for more information.

Building

trash-d can be built using any D compiler, but it uses Dub and DMD by default. You may need to adapt the build scripts, but the code should be completely portable.

You can build it with Dub using dub build and run tests with dub test.

CMake build files can be generated using dub generate cmake.

Using Mise

trash-d uses Mise-en-Place for its build tooling. This is completely optional and is not required to actually build the project (only a D compiler is) but makes things easier. Use mise run to list all the available tasks.

scdoc is required to build the manual page. A Mise plugin is provided that can build and install scdoc for you, use mise plugin link scdoc to activate it.

Contributing

Contributions welcome! Please come help me clean up my D code, and otherwise make trash-d more useful!

In particular help with packaging trash-d for various distros and expanding support for other operating systems would be greatly appreciated!

However keep in mind that this is a simple tool with a simple job, so it’s never going to do that much.

Patches are also accepted via email if that’s more your jam, see Contact below for more info.

Version Numbers

Versions of trash-d are numbered sequentially with a bump every time I change some functionality. Consider every change to be a breaking change, and be happily surprised when it’s not! I have a bad habit of bumping the number with one commit, only to immediately bump it again before tagging a release. So the releases might have some gaps. Sorry about that…

Version names are changed whenever something major has changed. Don’t treat these like actual version indicators, they’re just something fun.

License

trash-d is licensed under the terms of the MIT License. You are free to use it for any purpose under the terms of that license.

Similar Projects

Unlike many of these trash-d does not require an interpreter like Bash or Python, and is flag compatible with rm.

Contact

You can email me at mailto:[email protected] or open an issue here on GitHub.

We do not have a mailing list or anything of that sort, but there is an ATOM feed of releases.

评论

暂无评论