Update to trash-d-18

Changelog: https://github.com/rushsteve1/trash-d/releases/tag/18
This commit is contained in:
bcallah 2022-07-14 20:53:23 +00:00
parent 1b00e00131
commit 4cdab68866
3 changed files with 125 additions and 137 deletions

View File

@ -6,7 +6,7 @@ CATEGORIES = sysutils
GH_ACCOUNT = rushsteve1 GH_ACCOUNT = rushsteve1
GH_PROJECT = trash-d GH_PROJECT = trash-d
GH_TAGNAME = 17 GH_TAGNAME = 18
MAINTAINER = Brian Callahan <bcallah@openbsd.org> MAINTAINER = Brian Callahan <bcallah@openbsd.org>
@ -23,14 +23,14 @@ BUILD_DEPENDS = devel/dub,dmd
# Put the new trash.1 in ${FILESDIR} # Put the new trash.1 in ${FILESDIR}
# Update sha256 hash here # Update sha256 hash here
post-patch: post-patch:
@[ `sha256 < ${WRKSRC}/MANUAL.md` == e4b728a909c1fc782e731836681139e340fe39933f5c3faed502c493bd379ef8 ] || \ @[ `sha256 < ${WRKSRC}/MANUAL.md` == 3b6f8936d018781146eb4036a492281443ea60de06adea6471f065c70d1c466e ] || \
(echo "*** manpage changed; regenerate ${FILESDIR}/trash.1"; sleep 3) (echo "*** manpage changed; regenerate ${FILESDIR}/trash.1"; sleep 3)
do-build: do-build:
cd ${WRKSRC} && dub build -b release --cache=local --compiler=dmd cd ${WRKSRC} && dub build -b release --cache=local --compiler=dmd
do-install: do-install:
${INSTALL_PROGRAM} ${WRKSRC}/trash ${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/build/trash ${PREFIX}/bin
${INSTALL_MAN} ${FILESDIR}/trash.1 ${PREFIX}/man/man1 ${INSTALL_MAN} ${FILESDIR}/trash.1 ${PREFIX}/man/man1
do-test: do-test:

View File

@ -1,2 +1,2 @@
SHA256 (trash-d-17.tar.gz) = mgEpBfq6en+G/HdOQoETKYEP+FCfPZOckrdaIybD7Jo= SHA256 (trash-d-18.tar.gz) = SJMqcL0J7Po7l1UG07KcIyMSa87jzVjQaisiPavp//I=
SIZE (trash-d-17.tar.gz) = 16376 SIZE (trash-d-18.tar.gz) = 16994

View File

@ -1,151 +1,139 @@
.\" Automatically generated by Pandoc 2.16.1 .\" generated with Ronn/v0.7.3
.\" .\" http://github.com/rtomayko/ronn/tree/0.7.3
.TH "TRASH-D" "1" "November 24, 2021" "trash-d 14" "User Manual" .
.hy .TH "TRASH" "1" "July 2022" "" ""
.SH NAME .
.PP .SH "NAME"
trash-d - A near drop-in replacement for \f[B]\f[CB]rm\f[B]\f[R] that \fBtrash\fR \- A near drop\-in replacement for \fBrm\fR that uses the trash bin
uses the trash bin .
.PP .P
\f[B]Note:\f[R] The name of this software is \[lq]trash-d\[rq] however \fBNote:\fR The name of this software is "trash\-d" however its executable is simply called \fB\fBtrash\fR\fR\. This manual favors the latter, but the two should be considered interchangable\.
its executable is simply called \f[B]\f[CB]trash\f[B]\f[R]. .
This manual favors the latter, but the two should be considered .SH "SYNOPSIS"
interchangable. trash [\fIoption\fR]\.\.\. \fIfile\fR\.\.\.
.SH SYNOPSIS .
.PP .SH "DESCRIPTION"
trash [\f[I]option\f[R]]\&... A near drop\-in replacement for \fB\fBrm\fR\fR(1) that uses the FreeDesktop trash bin\. Written in the D programming language using only D\'s Phobos standard library\.
\f[I]file\f[R]\&... .
.SH DESCRIPTION .P
.PP The options and flags are intended to mirror \fB\fBrm\fR\fR\'s closely, with some additional long options for the \fB\fBtrash\fR\fR specific features\.
A near drop-in replacement for \f[B]\f[CB]rm\f[B]\f[R](1) that uses the .
FreeDesktop trash bin. .SS "Options"
Written in the D programming language using only D\[cq]s Phobos standard .
library.
.PP
The options and flags are intended to mirror
\f[B]\f[CB]rm\f[B]\f[R]\[cq]s closely, with some additional long options
for the \f[B]\f[CB]trash\f[B]\f[R] specific features.
.SS Options
.TP .TP
\f[B]\f[R]\f[C]-d\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]--dir\f[R]\f[B]\f[R] \fB\fB\-d\fR\fR, \fB\fB\-\-dir\fR\fR
Remove empty directories. Remove empty directories\.
.
.TP .TP
\f[B]\f[R]\f[C]-r\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]-R\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]--recursive\f[R]\f[B]\f[R] \fB\fB\-r\fR\fR, \fB\fB\-R\fR\fR, \fB\fB\-\-recursive\fR\fR
Delete directories and their contents. Delete directories and their contents\.
.
.TP .TP
\f[B]\f[R]\f[C]-v\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]--verbose\f[R]\f[B]\f[R] \fB\fB\-v\fR\fR, \fB\fB\-\-verbose\fR\fR
Print more information. Print more information\.
.
.TP .TP
\f[B]\f[R]\f[C]-i\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]--interactive\f[R]\f[B]\f[R] \fB\fB\-i\fR\fR, \fB\fB\-\-interactive\fR\fR
Ask before each deletion. Ask before each deletion\.
.
.TP .TP
\f[B]\f[R]\f[C]-I\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]--interact-once\f[R]\f[B]\f[R] \fB\fB\-I\fR\fR, \fB\fB\-\-interact\-once\fR\fR
Ask before deleting 3 or more files, or deleting recursively Ask before deleting 3 or more files, or deleting recursively
.
.TP .TP
\f[B]\f[R]\f[C]-f\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]--force\f[R]\f[B]\f[R] \fB\fB\-f\fR\fR, \fB\fB\-\-force\fR\fR
Don\[cq]t prompt and ignore errors. Don\'t prompt and ignore errors\.
.
.TP .TP
\f[B]\f[R]\f[C]--version\f[R]\f[B]\f[R] \fB\fB\-\-version\fR\fR
Output the version and exit. Output the version and exit\.
.
.TP .TP
\f[B]\f[R]\f[C]--list\f[R]\f[B]\f[R] \fB\fB\-\-list\fR\fR
List out the files in the trash. List out the files in the trash\.
.
.TP .TP
\f[B]\f[R]\f[C]--orphans\f[R]\f[B]\f[R] \fB\fB\-\-orphans\fR\fR
List orphaned files in the trash. List orphaned files in the trash\.
.
.TP .TP
\f[B]\f[R]\f[C]--delete\f[R]\f[B]\f[R] \f[I]file\f[R] \fB\fB\-\-delete\fR\fR \fIfile\fR
Delete a file from the trash. Delete a file from the trash\.
.
.TP .TP
\f[B]\f[R]\f[C]--restore\f[R]\f[B]\f[R] \f[I]file\f[R] \fB\fB\-\-restore\fR\fR \fIfile\fR
Restore a file from the trash. Restore a file from the trash\.
.
.TP .TP
\f[B]\f[R]\f[C]--empty\f[R]\f[B]\f[R] \fB\fB\-\-empty\fR\fR
Empty the trash bin. Empty the trash bin\.
.
.TP .TP
\f[B]\f[R]\f[C]--rm\f[R]\f[B]\f[R] \f[I]files\f[R]\&... \fB\fB\-\-rm\fR\fR \fIfiles\fR\.\.\.
Escape hatch to permanently delete a file. Escape hatch to permanently delete a file\.
.
.TP .TP
\f[B]\f[R]\f[C]-h\f[R]\f[B]\f[R], \f[B]\f[R]\f[C]--help\f[R]\f[B]\f[R] \fB\fB\-h\fR\fR, \fB\fB\-\-help\fR\fR
This help information. This help information\.
.SS Precedence .
.PP .SS "Precedence"
The \f[B]\f[CB]--help\f[B]\f[R], \f[B]\f[CB]--version\f[B]\f[R], The \fB\fB\-\-help\fR\fR, \fB\fB\-\-version\fR\fR, \fB\fB\-\-list\fR\fR, \fB\fB\-\-orphans\fR\fR, \fB\fB\-\-restore\fR\fR, \fB\fB\-\-delete\fR\fR, and \fB\fB\-\-empty\fR\fR 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\.
\f[B]\f[CB]--list\f[B]\f[R], \f[B]\f[CB]--orphans\f[B]\f[R], .
\f[B]\f[CB]--restore\f[B]\f[R], \f[B]\f[CB]--delete\f[B]\f[R], and .P
\f[B]\f[CB]--empty\f[B]\f[R] flags all cause the program to Therefore the command \'\fBtrash \-\-empty \-\-list\fR\' will list the trash bin and NOT empty it\.
short-circuit and perform only that operation and no others. .
Their precedence is in that order exactly, and is intended to cause the .P
least destruction. \fBNote:\fR Before version 11 trash\-d followed a slightly incorrect precedence order\.
.PP .
Therefore the command `\f[C]trash --empty --list\f[R]' will list the .SS "Compatibility with rm(1)"
trash bin and NOT empty it. One of trash\-d\'s primary goals is near compatibility with the GNU \fB\fBrm(1)\fR\fR tool\. The keyword here is "near"\. The goal is not exact flag\-for\-flag compatibility with \fB\fBrm\fR\fR, but you should be able to \'\fBalias rm=trash\fR\' and not notice the difference\. But since \fB\fBrm\fR\fR has different failure states and error messages it can never be 100% compatible\.
.PP .
\f[B]Note:\f[R] Before version 11 trash-d followed a slightly incorrect .P
precedence order. Additionally since there are a few different implementations of \fB\fBrm(1)\fR\fR (BSDs and so on) that are all subtly incompatible with each other I can\'t guarantee compatibility with all versions\.
.SS Compatibility with \f[B]\f[CB]rm\f[B]\f[R](1) .
.PP .P
One of trash-d\[cq]s primary goals is near compatibility with the GNU As of version 16 unknown options will throw an error\. Prior to version 16 unknown options were silently ignored\.
\f[B]\f[CB]rm(1)\f[B]\f[R] tool. .
The keyword here is \[lq]near\[rq]. .P
The goal is not exact flag-for-flag compatibility with As of version 17 trash\-d will not follow symlinks recursively through directories\. This may in some cases be inconsistent with \fB\fBrm\fR\fR but errs on the side of not deleting your files\.
\f[B]\f[CB]rm\f[B]\f[R], but you should be able to .
`\f[C]alias rm=trash\f[R]' and not notice the difference. .SH "ENVIRONMENT"
But since \f[B]\f[CB]rm\f[B]\f[R] has different failure states and error .
messages it can never be 100% compatible.
.PP
Additionally since there are a few different implementations of
\f[B]\f[CB]rm(1)\f[B]\f[R] (BSDs and so on) that are all subtly
incompatible with each other I can\[cq]t guarantee compatibility with
all versions.
.PP
As of version 16 unknown options will throw an error.
Prior to version 16 unknown options were silently ignored.
.PP
As of version 17 trash-d will not follow symlinks recursively through
directories.
This may in some cases be inconsistent with \f[B]\f[CB]rm\f[B]\f[R] but
errs on the side of not deleting your files.
.SH ENVIRONMENT
.TP .TP
\f[B]\f[R]\f[C]XDG_DATA_HOME\f[R]\f[B]\f[R] \fB\fBXDG_DATA_HOME\fR\fR
This variable is used to determine where the default trash directory is This variable is used to determine where the default trash directory is for this user as per the FreeDesktop specification\.
for this user as per the FreeDesktop specification. .
.TP .TP
\f[B]\f[R]\f[C]TRASH_D_DIR\f[R]\f[B]\f[R] \fB\fBTRASH_D_DIR\fR\fR
Override the trash directory to the specified path, useful for trashing Override the trash directory to the specified path, useful for trashing on removable devices\.
on removable devices. .
.SH FILES .SH "FILES"
.
.TP .TP
\f[B]\f[R]\f[C]$XDG_DATA_HOME/Trash\f[R]\f[B]\f[R] \fB\fB$XDG_DATA_HOME/Trash\fR\fR
Standard location of trash files and metadata as per the FreeDesktop Standard location of trash files and metadata as per the FreeDesktop specification\. Used in the absence of \fB\fB$TRASH_D_DIR\fR\fR\.
specification. .
Used in the absence of \f[B]\f[CB]$TRASH_D_DIR\f[B]\f[R].
.TP .TP
\f[B]\f[R]\f[C]\[ti]/.local/share/Trash\f[R]\f[B]\f[R] \fB\fB~/\.local/share/Trash\fR\fR
The fallback path used in the absence of both The fallback path used in the absence of both \fB\fB$XDG_DATA_HOME\fR\fR and \fB\fB$TRASH_D_DIR\fR\fR\.
\f[B]\f[CB]$XDG_DATA_HOME\f[B]\f[R] and .
\f[B]\f[CB]$TRASH_D_DIR\f[B]\f[R]. .SH "EXIT STATUS"
.SH EXIT STATUS \fB\fBtrash\fR\fR exits with the status code 0 on success, and >0 if an error occurs\.
.PP .
\f[B]\f[CB]trash\f[B]\f[R] exits with the status code 0 on success, and .SH "SEE ALSO"
>0 if an error occurs. \fB\fBrm\fR\fR(1), \fB\fBuser\-dirs\.conf\fR\fR(5)
.SH SEE ALSO .
.PP .SH "STANDARDS"
\f[B]\f[CB]rm\f[B]\f[R](1), \f[B]\f[CB]user-dirs.conf\f[B]\f[R](5) By mimicking \fBrm\fR this utility is partially POSIX compliant however this is \fBNOT\fR to be relied upon for any purpose\.
.SH STANDARDS .
.PP .P
By mimicking \f[B]rm\f[R] this utility is partially POSIX compliant trash\-d is compliant with the FreeDesktop trash specification: https://specifications\.freedesktop\.org/trash\-spec/trashspec\-latest\.html
however this is \f[B]NOT\f[R] to be relied upon for any purpose. .
.PP .SH "AUTHOR"
trash-d is compliant with the FreeDesktop trash specification: Steven vanZyl \fIrushsteve1@rushsteve1\.us\fR
https://specifications.freedesktop.org/trash-spec/trashspec-latest.html .
.SH AUTHOR .P
.PP The up\-to\-date sources can be found at: https://github\.com/rushsteve1/trash\-d
Steven vanZyl <rushsteve1@rushsteve1.us> .
.PP .SH "BUGS"
The up-to-date sources can be found at: https://github\.com/rushsteve1/trash\-d/issues
https://github.com/rushsteve1/trash-d
.SH BUGS
.PP
https://github.com/rushsteve1/trash-d/issues