Update to trash-d-18
Changelog: https://github.com/rushsteve1/trash-d/releases/tag/18
This commit is contained in:
parent
1b00e00131
commit
4cdab68866
|
@ -6,7 +6,7 @@ CATEGORIES = sysutils
|
|||
|
||||
GH_ACCOUNT = rushsteve1
|
||||
GH_PROJECT = trash-d
|
||||
GH_TAGNAME = 17
|
||||
GH_TAGNAME = 18
|
||||
|
||||
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
|
||||
|
||||
|
@ -23,14 +23,14 @@ BUILD_DEPENDS = devel/dub,dmd
|
|||
# Put the new trash.1 in ${FILESDIR}
|
||||
# Update sha256 hash here
|
||||
post-patch:
|
||||
@[ `sha256 < ${WRKSRC}/MANUAL.md` == e4b728a909c1fc782e731836681139e340fe39933f5c3faed502c493bd379ef8 ] || \
|
||||
@[ `sha256 < ${WRKSRC}/MANUAL.md` == 3b6f8936d018781146eb4036a492281443ea60de06adea6471f065c70d1c466e ] || \
|
||||
(echo "*** manpage changed; regenerate ${FILESDIR}/trash.1"; sleep 3)
|
||||
|
||||
do-build:
|
||||
cd ${WRKSRC} && dub build -b release --cache=local --compiler=dmd
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/trash ${PREFIX}/bin
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/build/trash ${PREFIX}/bin
|
||||
${INSTALL_MAN} ${FILESDIR}/trash.1 ${PREFIX}/man/man1
|
||||
|
||||
do-test:
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
SHA256 (trash-d-17.tar.gz) = mgEpBfq6en+G/HdOQoETKYEP+FCfPZOckrdaIybD7Jo=
|
||||
SIZE (trash-d-17.tar.gz) = 16376
|
||||
SHA256 (trash-d-18.tar.gz) = SJMqcL0J7Po7l1UG07KcIyMSa87jzVjQaisiPavp//I=
|
||||
SIZE (trash-d-18.tar.gz) = 16994
|
||||
|
|
|
@ -1,151 +1,139 @@
|
|||
.\" Automatically generated by Pandoc 2.16.1
|
||||
.\"
|
||||
.TH "TRASH-D" "1" "November 24, 2021" "trash-d 14" "User Manual"
|
||||
.hy
|
||||
.SH NAME
|
||||
.PP
|
||||
trash-d - A near drop-in replacement for \f[B]\f[CB]rm\f[B]\f[R] that
|
||||
uses the trash bin
|
||||
.PP
|
||||
\f[B]Note:\f[R] The name of this software is \[lq]trash-d\[rq] however
|
||||
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
|
||||
interchangable.
|
||||
.SH SYNOPSIS
|
||||
.PP
|
||||
trash [\f[I]option\f[R]]\&...
|
||||
\f[I]file\f[R]\&...
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
A near drop-in replacement for \f[B]\f[CB]rm\f[B]\f[R](1) that uses the
|
||||
FreeDesktop trash bin.
|
||||
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
|
||||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "TRASH" "1" "July 2022" "" ""
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBtrash\fR \- A near drop\-in replacement for \fBrm\fR that uses the trash bin
|
||||
.
|
||||
.P
|
||||
\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\.
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
trash [\fIoption\fR]\.\.\. \fIfile\fR\.\.\.
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
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\.
|
||||
.
|
||||
.P
|
||||
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\.
|
||||
.
|
||||
.SS "Options"
|
||||
.
|
||||
.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]
|
||||
Remove empty directories.
|
||||
\fB\fB\-d\fR\fR, \fB\fB\-\-dir\fR\fR
|
||||
Remove empty directories\.
|
||||
.
|
||||
.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]
|
||||
Delete directories and their contents.
|
||||
\fB\fB\-r\fR\fR, \fB\fB\-R\fR\fR, \fB\fB\-\-recursive\fR\fR
|
||||
Delete directories and their contents\.
|
||||
.
|
||||
.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]
|
||||
Print more information.
|
||||
\fB\fB\-v\fR\fR, \fB\fB\-\-verbose\fR\fR
|
||||
Print more information\.
|
||||
.
|
||||
.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]
|
||||
Ask before each deletion.
|
||||
\fB\fB\-i\fR\fR, \fB\fB\-\-interactive\fR\fR
|
||||
Ask before each deletion\.
|
||||
.
|
||||
.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
|
||||
.
|
||||
.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]
|
||||
Don\[cq]t prompt and ignore errors.
|
||||
\fB\fB\-f\fR\fR, \fB\fB\-\-force\fR\fR
|
||||
Don\'t prompt and ignore errors\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]--version\f[R]\f[B]\f[R]
|
||||
Output the version and exit.
|
||||
\fB\fB\-\-version\fR\fR
|
||||
Output the version and exit\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]--list\f[R]\f[B]\f[R]
|
||||
List out the files in the trash.
|
||||
\fB\fB\-\-list\fR\fR
|
||||
List out the files in the trash\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]--orphans\f[R]\f[B]\f[R]
|
||||
List orphaned files in the trash.
|
||||
\fB\fB\-\-orphans\fR\fR
|
||||
List orphaned files in the trash\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]--delete\f[R]\f[B]\f[R] \f[I]file\f[R]
|
||||
Delete a file from the trash.
|
||||
\fB\fB\-\-delete\fR\fR \fIfile\fR
|
||||
Delete a file from the trash\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]--restore\f[R]\f[B]\f[R] \f[I]file\f[R]
|
||||
Restore a file from the trash.
|
||||
\fB\fB\-\-restore\fR\fR \fIfile\fR
|
||||
Restore a file from the trash\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]--empty\f[R]\f[B]\f[R]
|
||||
Empty the trash bin.
|
||||
\fB\fB\-\-empty\fR\fR
|
||||
Empty the trash bin\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]--rm\f[R]\f[B]\f[R] \f[I]files\f[R]\&...
|
||||
Escape hatch to permanently delete a file.
|
||||
\fB\fB\-\-rm\fR\fR \fIfiles\fR\.\.\.
|
||||
Escape hatch to permanently delete a file\.
|
||||
.
|
||||
.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]
|
||||
This help information.
|
||||
.SS Precedence
|
||||
.PP
|
||||
The \f[B]\f[CB]--help\f[B]\f[R], \f[B]\f[CB]--version\f[B]\f[R],
|
||||
\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
|
||||
\f[B]\f[CB]--empty\f[B]\f[R] 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.
|
||||
.PP
|
||||
Therefore the command `\f[C]trash --empty --list\f[R]' will list the
|
||||
trash bin and NOT empty it.
|
||||
.PP
|
||||
\f[B]Note:\f[R] Before version 11 trash-d followed a slightly incorrect
|
||||
precedence order.
|
||||
.SS Compatibility with \f[B]\f[CB]rm\f[B]\f[R](1)
|
||||
.PP
|
||||
One of trash-d\[cq]s primary goals is near compatibility with the GNU
|
||||
\f[B]\f[CB]rm(1)\f[B]\f[R] tool.
|
||||
The keyword here is \[lq]near\[rq].
|
||||
The goal is not exact flag-for-flag compatibility with
|
||||
\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.
|
||||
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
|
||||
\fB\fB\-h\fR\fR, \fB\fB\-\-help\fR\fR
|
||||
This help information\.
|
||||
.
|
||||
.SS "Precedence"
|
||||
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\.
|
||||
.
|
||||
.P
|
||||
Therefore the command \'\fBtrash \-\-empty \-\-list\fR\' will list the trash bin and NOT empty it\.
|
||||
.
|
||||
.P
|
||||
\fBNote:\fR Before version 11 trash\-d followed a slightly incorrect precedence order\.
|
||||
.
|
||||
.SS "Compatibility with rm(1)"
|
||||
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\.
|
||||
.
|
||||
.P
|
||||
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\.
|
||||
.
|
||||
.P
|
||||
As of version 16 unknown options will throw an error\. Prior to version 16 unknown options were silently ignored\.
|
||||
.
|
||||
.P
|
||||
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\.
|
||||
.
|
||||
.SH "ENVIRONMENT"
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]XDG_DATA_HOME\f[R]\f[B]\f[R]
|
||||
This variable is used to determine where the default trash directory is
|
||||
for this user as per the FreeDesktop specification.
|
||||
\fB\fBXDG_DATA_HOME\fR\fR
|
||||
This variable is used to determine where the default trash directory is for this user as per the FreeDesktop specification\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]TRASH_D_DIR\f[R]\f[B]\f[R]
|
||||
Override the trash directory to the specified path, useful for trashing
|
||||
on removable devices.
|
||||
.SH FILES
|
||||
\fB\fBTRASH_D_DIR\fR\fR
|
||||
Override the trash directory to the specified path, useful for trashing on removable devices\.
|
||||
.
|
||||
.SH "FILES"
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]$XDG_DATA_HOME/Trash\f[R]\f[B]\f[R]
|
||||
Standard location of trash files and metadata as per the FreeDesktop
|
||||
specification.
|
||||
Used in the absence of \f[B]\f[CB]$TRASH_D_DIR\f[B]\f[R].
|
||||
\fB\fB$XDG_DATA_HOME/Trash\fR\fR
|
||||
Standard location of trash files and metadata as per the FreeDesktop specification\. Used in the absence of \fB\fB$TRASH_D_DIR\fR\fR\.
|
||||
.
|
||||
.TP
|
||||
\f[B]\f[R]\f[C]\[ti]/.local/share/Trash\f[R]\f[B]\f[R]
|
||||
The fallback path used in the absence of both
|
||||
\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
|
||||
.PP
|
||||
\f[B]\f[CB]trash\f[B]\f[R] exits with the status code 0 on success, and
|
||||
>0 if an error occurs.
|
||||
.SH SEE ALSO
|
||||
.PP
|
||||
\f[B]\f[CB]rm\f[B]\f[R](1), \f[B]\f[CB]user-dirs.conf\f[B]\f[R](5)
|
||||
.SH STANDARDS
|
||||
.PP
|
||||
By mimicking \f[B]rm\f[R] this utility is partially POSIX compliant
|
||||
however this is \f[B]NOT\f[R] to be relied upon for any purpose.
|
||||
.PP
|
||||
trash-d is compliant with the FreeDesktop trash specification:
|
||||
https://specifications.freedesktop.org/trash-spec/trashspec-latest.html
|
||||
.SH AUTHOR
|
||||
.PP
|
||||
Steven vanZyl <rushsteve1@rushsteve1.us>
|
||||
.PP
|
||||
The up-to-date sources can be found at:
|
||||
https://github.com/rushsteve1/trash-d
|
||||
.SH BUGS
|
||||
.PP
|
||||
https://github.com/rushsteve1/trash-d/issues
|
||||
\fB\fB~/\.local/share/Trash\fR\fR
|
||||
The fallback path used in the absence of both \fB\fB$XDG_DATA_HOME\fR\fR and \fB\fB$TRASH_D_DIR\fR\fR\.
|
||||
.
|
||||
.SH "EXIT STATUS"
|
||||
\fB\fBtrash\fR\fR exits with the status code 0 on success, and >0 if an error occurs\.
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
\fB\fBrm\fR\fR(1), \fB\fBuser\-dirs\.conf\fR\fR(5)
|
||||
.
|
||||
.SH "STANDARDS"
|
||||
By mimicking \fBrm\fR this utility is partially POSIX compliant however this is \fBNOT\fR to be relied upon for any purpose\.
|
||||
.
|
||||
.P
|
||||
trash\-d is compliant with the FreeDesktop trash specification: https://specifications\.freedesktop\.org/trash\-spec/trashspec\-latest\.html
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Steven vanZyl \fIrushsteve1@rushsteve1\.us\fR
|
||||
.
|
||||
.P
|
||||
The up\-to\-date sources can be found at: https://github\.com/rushsteve1/trash\-d
|
||||
.
|
||||
.SH "BUGS"
|
||||
https://github\.com/rushsteve1/trash\-d/issues
|
||||
|
|
Loading…
Reference in New Issue