-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a minor maintenance release focused on improving the tooling and build process. I apologize to any package maintainers that are affected, and hope you agree with some of the changes! Tooling changes: - Copyright info was updated - The Rakefile has been replaced with a Justfile - Ronn-ng has been replaced with scdoc With these the build dependency on Ruby is now gone! The package.rb file remains to build DEBs and RPMs with FPM. However I will no longer be providing these myself. I don't think users should be relying on these. Code changes: - Functions were all annotated with @safe or @trusted as applicable - Version name information is again in dub.json My hope is that by relying on D's safety features we can make stronger guarantees about the program, which helps long-term maintenance. The version is now 20 and the version name is now "Annette Birkin" from Resident Evil 2.
- Loading branch information
1 parent
2537f7b
commit a34882f
Showing
15 changed files
with
243 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
build_dir := "./build" | ||
|
||
default: | ||
@just --list | ||
|
||
all: | ||
just release manpage package | ||
|
||
build: | ||
dub build | ||
|
||
clean: | ||
dub clean | ||
rm -r {{build_dir}} | ||
|
||
release: | ||
dub build --build=release | ||
strip {{build_dir}}/trash | ||
|
||
test: | ||
dub test | ||
|
||
coverage: | ||
mkdir -p {{build_dir}}/coverage | ||
dub test --coverage | ||
mv *.lst {build_dir}}/coverage | ||
|
||
lint: | ||
dub lint | ||
|
||
format: | ||
dub run dfmt -- -i source/**/*.d | ||
|
||
manpage: | ||
scdoc < MANUAL.scd > {{build_dir}}/trash.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
TRASH(1) | ||
|
||
# NAME | ||
|
||
trash(1) - A near drop-in replacement for `rm` that uses the trash bin | ||
|
||
The name of this software is "trash-d" however its executable | ||
is simply called *trash*. This manual favors the latter, but the two | ||
should be considered interchangeable. | ||
|
||
# SYNOPSIS | ||
|
||
trash [_option_]... _file_... | ||
|
||
# DESCRIPTION | ||
|
||
A near drop-in replacement for *rm*(1) that uses the FreeDesktop trash bin. | ||
Written in the D programming language using only D's Phobos standard library. | ||
|
||
The options and flags are intended to mirror *rm*'s closely, with some | ||
additional long options for the *trash* specific features. | ||
|
||
## Options | ||
|
||
*-d*, *--dir* | ||
: Remove empty directories. | ||
|
||
*-r*, *-R*, *--recursive* | ||
: Delete directories and their contents. | ||
|
||
*-v*, *--verbose* | ||
: Print more information. | ||
|
||
*-i*, *--interactive* | ||
: Ask before each deletion. | ||
|
||
*-I*, *--interact-once* | ||
: Ask before deleting 3 or more files, or deleting recursively | ||
|
||
*-f*, *--force* | ||
: Don't prompt and ignore errors. | ||
|
||
*--version* | ||
: Output the version and exit. | ||
|
||
*--list* | ||
: List out the files in the trash. | ||
|
||
*--orphans* | ||
: List orphaned files in the trash. | ||
|
||
*--delete* _file_ | ||
: Delete a file from the trash. | ||
|
||
*--restore* _file_ | ||
: Restore a file from the trash. | ||
|
||
*--empty* | ||
: Empty the trash bin. | ||
|
||
*--rm* _files_... | ||
: Escape hatch to permanently delete a file. | ||
|
||
*-h*, *--help* | ||
: This help information. | ||
|
||
## Precedence | ||
|
||
The *--help*, *--version*, *--list*, *--orphans*, | ||
*--restore*, *--delete*, and *--empty* flags all cause the program | ||
to short-circuit and perform only that operation and no others. Their | ||
precedence is in that order exactly, and is intended to cause the least | ||
destruction. | ||
|
||
Therefore the command '`trash --empty --list`' will list the trash bin and NOT | ||
empty it. | ||
|
||
*Note:* Before version 11 trash-d followed a slightly incorrect precedence | ||
order. | ||
|
||
## Compatibility with *rm*(1) | ||
|
||
One of trash-d's primary goals is near compatibility with the GNU *rm(1)* | ||
tool. The keyword here is "near". The goal is not exact flag-for-flag | ||
compatibility with *rm*, but you should be able to '`alias rm=trash`' and | ||
not notice the difference. But since *rm* has different failure states and | ||
error messages it can never be 100% compatible. | ||
|
||
Additionally since there are a few different implementations of *rm(1)* | ||
(BSDs and so on) that are all subtly incompatible with each other I can't | ||
guarantee compatibility with all versions. | ||
|
||
As of version 16 unknown options will throw an error. Prior to | ||
version 16 unknown options were silently ignored. | ||
|
||
As of version 17 trash-d will not follow symlinks recursively through | ||
directories. This may in some cases be inconsistent with *rm* but errs on | ||
the side of not deleting your files. | ||
|
||
# ENVIRONMENT | ||
|
||
*XDG_DATA_HOME* | ||
This variable is used to determine where the default trash directory is for | ||
this user as per the FreeDesktop specification. | ||
|
||
*TRASH_D_DIR* | ||
Override the trash directory to the specified path, useful for trashing on | ||
removable devices. | ||
|
||
# FILES | ||
|
||
*$XDG_DATA_HOME/Trash* | ||
Standard location of trash files and metadata as per the FreeDesktop | ||
specification. Used in the absence of *$TRASH_D_DIR*. | ||
|
||
*~/.local/share/Trash* | ||
The fallback path used in the absence of both *$XDG_DATA_HOME* and | ||
*$TRASH_D_DIR*. | ||
|
||
# EXIT STATUS | ||
|
||
*trash* exits with the status code 0 on success, and >0 if an error occurs. | ||
|
||
# SEE ALSO | ||
|
||
*rm*(1), *user-dirs.conf*(5) | ||
|
||
# STANDARDS | ||
|
||
By mimicking *rm* this utility is partially POSIX compliant however this is | ||
*NOT* to be relied upon for any purpose. | ||
|
||
trash-d is compliant with the FreeDesktop trash specification: | ||
https://specifications.freedesktop.org/trash-spec/trashspec-latest.html | ||
|
||
# AUTHOR | ||
|
||
Steven vanZyl <rushsteve1@rushsteve1.us> | ||
|
||
The up-to-date sources can be found at: https://github.com/rushsteve1/trash-d | ||
|
||
# BUGS | ||
|
||
https://github.com/rushsteve1/trash-d/issues |
Oops, something went wrong.