add manpage gt(1)
This commit is contained in:
parent
8b01bffffe
commit
b2854a5b98
238
gt.1
Normal file
238
gt.1
Normal file
|
@ -0,0 +1,238 @@
|
||||||
|
.\" Generated by scdoc 1.11.3
|
||||||
|
.\" Complete documentation for this program is not available as a GNU info page
|
||||||
|
.ie \n(.g .ds Aq \(aq
|
||||||
|
.el .ds Aq '
|
||||||
|
.nh
|
||||||
|
.ad l
|
||||||
|
.\" Begin generated content:
|
||||||
|
.TH "gt" "1" "2024-07-31" "gt version v0.0.1" "User Commands"
|
||||||
|
.PP
|
||||||
|
.SH NAME
|
||||||
|
.PP
|
||||||
|
gt - manual page for gt version 0.\&0.\&1
|
||||||
|
.PP
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.PP
|
||||||
|
.SS NAME:
|
||||||
|
.PP
|
||||||
|
gt - Simple command line XDG Trash application
|
||||||
|
.PP
|
||||||
|
.SS USAGE:
|
||||||
|
.PP
|
||||||
|
gt [global options] [command [command options] / filename(s)]
|
||||||
|
.PP
|
||||||
|
.SS INFO:
|
||||||
|
.PP
|
||||||
|
g(o)t(rash) is a simple, command line program to interface with the XDG Trash.\& Files in the trash may be listed, cleaned, or restored via an interactive table, and filtered with various flags.\&
|
||||||
|
.PP
|
||||||
|
.SS VERSION:
|
||||||
|
.PP
|
||||||
|
0.\&0.\&1
|
||||||
|
.PP
|
||||||
|
.SS AUTHOR:
|
||||||
|
.PP
|
||||||
|
Lilian Jónsdóttir <lilian.\&jonsdottir@gmail.\&com>
|
||||||
|
.PP
|
||||||
|
.SH INTERACTIVE MODE
|
||||||
|
.PP
|
||||||
|
Run with no args to start interactive mode.\& In interactive mode, files in the trash are displayed, and may be selected to either restore or remove permanently.\&
|
||||||
|
.PP
|
||||||
|
.SH RM-LIKE TRASHING
|
||||||
|
.PP
|
||||||
|
Run with no command and only filename(s) as argument(s) to skip displaying files, sending them straight to the trash, in a quick, rm-like way.\&
|
||||||
|
.PP
|
||||||
|
.SH COMMANDS
|
||||||
|
.PP
|
||||||
|
.SS TRASH:
|
||||||
|
\fIcommand\fR: trash, tr
|
||||||
|
.RS 4
|
||||||
|
Trash a file or files
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIusage\fR:
|
||||||
|
.RS 4
|
||||||
|
trash [command options] [filename(s)]
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIinfo\fR:
|
||||||
|
.RS 4
|
||||||
|
The trash command finds files on the filesystem based on the filter flags and any filename args, and displays them in a sortable and filterable table, allowing them to be selectively trashed.\&
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIflags\fR:
|
||||||
|
.RS 4
|
||||||
|
\fB--recursive\fR, \fB-r\fR
|
||||||
|
.RS 4
|
||||||
|
operate on files recursively
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--work-dir\fR dir, \fB-w\fR dir
|
||||||
|
.RS 4
|
||||||
|
operate on files in this `DIRECTORY`
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--hidden\fR, \fB-h\fR
|
||||||
|
.RS 4
|
||||||
|
operate on hidden files
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
.SS LIST:
|
||||||
|
\fIcommand\fR: list, ls
|
||||||
|
.RS 4
|
||||||
|
List trashed files
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIusage\fR:
|
||||||
|
.RS 4
|
||||||
|
list [command options] [filename(s)]
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIinfo\fR:
|
||||||
|
.RS 4
|
||||||
|
The trash command finds files in the trash based on the filter flags and any filename args, and displays them in a sortable and filterable table.\&
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIflags:\fR
|
||||||
|
.RS 4
|
||||||
|
\fB--non-interactive\fR, \fB-n\fR
|
||||||
|
.RS 4
|
||||||
|
list files and quit
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--original-path\fR dir, \fB-O\fR dir
|
||||||
|
.RS 4
|
||||||
|
list files trashed from this directory
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
.SS RESTORE:
|
||||||
|
\fIcommand\fR: restore, re
|
||||||
|
.RS 4
|
||||||
|
Restore a trashed file or files
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIusage\fR:
|
||||||
|
.RS 4
|
||||||
|
restore [command options] [filename(s)]
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIinfo\fR:
|
||||||
|
.RS 4
|
||||||
|
The trash command finds files in the trash based on the filter flags and any filename args, and displays them in a sortable and filterable table, allowing them to be selectively restored.\&
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIflags:\fR
|
||||||
|
.RS 4
|
||||||
|
\fB--all\fR, \fB-a\fR
|
||||||
|
.RS 4
|
||||||
|
operate on all files in trash
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--original-path\fR dir, \fB-O\fR dir
|
||||||
|
.RS 4
|
||||||
|
restore files trashed from this directory
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
.SS CLEAN:
|
||||||
|
\fIcommand\fR: clean, cl
|
||||||
|
.RS 4
|
||||||
|
Clean files from trash
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIusage\fR:
|
||||||
|
.RS 4
|
||||||
|
clean [command options] [filename(s)]
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIinfo\fR:
|
||||||
|
.RS 4
|
||||||
|
The trash command finds files in the trash based on the filter flags and any filename args, and displays them in a sortable and filterable table, allowing them to be selectively removed permanently.\&
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fIflags:\fR
|
||||||
|
.RS 4
|
||||||
|
\fB--all\fR, \fB-a\fR
|
||||||
|
.RS 4
|
||||||
|
operate on all files in trash
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--original-path\fR dir, \fB-O\fR dir
|
||||||
|
.RS 4
|
||||||
|
remove files trashed from this directory
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
.RE
|
||||||
|
.SH GLOBAL FLAGS
|
||||||
|
.PP
|
||||||
|
\fB--confirm\fR, \fB-c\fR
|
||||||
|
.RS 4
|
||||||
|
ask for confirmation before executing any action
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--log\fR level, \fB-l\fR level
|
||||||
|
.RS 4
|
||||||
|
set log level
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
.SH FILTER FLAGS (USABLE WITH ALL COMMANDS)
|
||||||
|
.PP
|
||||||
|
\fB--match\fR pattern, \fB-m\fR pattern
|
||||||
|
.RS 4
|
||||||
|
operate on files matching regex pattern
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--glob\fR pattern, \fB-m\fR pattern
|
||||||
|
.RS 4
|
||||||
|
operate on files matching glob
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--not-match\fR pattern, \fB-M\fR pattern
|
||||||
|
.RS 4
|
||||||
|
operate on files not matching regex pattern
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--not-glob\fR pattern, \fB-G\fR pattern
|
||||||
|
.RS 4
|
||||||
|
operate on files not matching glob
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--on\fR date, \fB-O\fR date
|
||||||
|
.RS 4
|
||||||
|
operate on files modified on date
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--before\fR date, \fB-B\fR date
|
||||||
|
.RS 4
|
||||||
|
operate on files modified before date
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--after\fR date, \fB-A\fR date
|
||||||
|
.RS 4
|
||||||
|
operate on files modified after date
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--files-only\fR, \fB-F\fR
|
||||||
|
.RS 4
|
||||||
|
operate on files only
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--dirs-only\fR, \fB-D\fR
|
||||||
|
.RS 4
|
||||||
|
operate on directories only
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--min-size\fR size, \fB-N\fR size
|
||||||
|
.RS 4
|
||||||
|
operate on files larger than size
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--max-size\fR size, \fB-X\fR size
|
||||||
|
.RS 4
|
||||||
|
operate on files smaller than size
|
||||||
|
.PP
|
||||||
|
.RE
|
||||||
|
\fB--mode\fR mode, \fB-x\fR mode
|
||||||
|
.RS 4
|
||||||
|
operate on files matching mode mode
|
154
gt.1.scd
Normal file
154
gt.1.scd
Normal file
|
@ -0,0 +1,154 @@
|
||||||
|
gt(1) ["gt version v0.0.1" ["User Commands"]]
|
||||||
|
|
||||||
|
# NAME
|
||||||
|
|
||||||
|
gt \- manual page for gt version 0.0.1
|
||||||
|
|
||||||
|
# DESCRIPTION
|
||||||
|
|
||||||
|
## NAME:
|
||||||
|
|
||||||
|
gt \- Simple command line XDG Trash application
|
||||||
|
|
||||||
|
## USAGE:
|
||||||
|
|
||||||
|
gt [global options] [command [command options] / filename(s)]
|
||||||
|
|
||||||
|
## INFO:
|
||||||
|
|
||||||
|
g(o)t(rash) is a simple, command line program to interface with the XDG Trash. Files in the trash may be listed, cleaned, or restored via an interactive table, and filtered with various flags.
|
||||||
|
|
||||||
|
## VERSION:
|
||||||
|
|
||||||
|
0.0.1
|
||||||
|
|
||||||
|
## AUTHOR:
|
||||||
|
|
||||||
|
Lilian Jónsdóttir <lilian.jonsdottir@gmail.com>
|
||||||
|
|
||||||
|
# INTERACTIVE MODE
|
||||||
|
|
||||||
|
Run with no args to start interactive mode. In interactive mode, files in the trash are displayed, and may be selected to either restore or remove permanently.
|
||||||
|
|
||||||
|
# RM-LIKE TRASHING
|
||||||
|
|
||||||
|
Run with no command and only filename(s) as argument(s) to skip displaying files, sending them straight to the trash, in a quick, rm-like way.
|
||||||
|
|
||||||
|
# COMMANDS
|
||||||
|
|
||||||
|
## TRASH:
|
||||||
|
_command_: trash, tr
|
||||||
|
Trash a file or files
|
||||||
|
|
||||||
|
_usage_:
|
||||||
|
trash [command options] [filename(s)]
|
||||||
|
|
||||||
|
_info_:
|
||||||
|
The trash command finds files on the filesystem based on the filter flags and any filename args, and displays them in a sortable and filterable table, allowing them to be selectively trashed.
|
||||||
|
|
||||||
|
_flags_:
|
||||||
|
*--recursive*, *-r*
|
||||||
|
operate on files recursively
|
||||||
|
|
||||||
|
*--work-dir* dir, *-w* dir
|
||||||
|
operate on files in this `DIRECTORY`
|
||||||
|
|
||||||
|
*--hidden*, *-h*
|
||||||
|
operate on hidden files
|
||||||
|
|
||||||
|
## LIST:
|
||||||
|
_command_: list, ls
|
||||||
|
List trashed files
|
||||||
|
|
||||||
|
_usage_:
|
||||||
|
list [command options] [filename(s)]
|
||||||
|
|
||||||
|
_info_:
|
||||||
|
The trash command finds files in the trash based on the filter flags and any filename args, and displays them in a sortable and filterable table.
|
||||||
|
|
||||||
|
_flags:_
|
||||||
|
*--non-interactive*, *-n*
|
||||||
|
list files and quit
|
||||||
|
|
||||||
|
*--original-path* dir, *-O* dir
|
||||||
|
list files trashed from this directory
|
||||||
|
|
||||||
|
## RESTORE:
|
||||||
|
_command_: restore, re
|
||||||
|
Restore a trashed file or files
|
||||||
|
|
||||||
|
_usage_:
|
||||||
|
restore [command options] [filename(s)]
|
||||||
|
|
||||||
|
_info_:
|
||||||
|
The trash command finds files in the trash based on the filter flags and any filename args, and displays them in a sortable and filterable table, allowing them to be selectively restored.
|
||||||
|
|
||||||
|
_flags:_
|
||||||
|
*--all*, *-a*
|
||||||
|
operate on all files in trash
|
||||||
|
|
||||||
|
*--original-path* dir, *-O* dir
|
||||||
|
restore files trashed from this directory
|
||||||
|
|
||||||
|
## CLEAN:
|
||||||
|
_command_: clean, cl
|
||||||
|
Clean files from trash
|
||||||
|
|
||||||
|
_usage_:
|
||||||
|
clean [command options] [filename(s)]
|
||||||
|
|
||||||
|
_info_:
|
||||||
|
The trash command finds files in the trash based on the filter flags and any filename args, and displays them in a sortable and filterable table, allowing them to be selectively removed permanently.
|
||||||
|
|
||||||
|
_flags:_
|
||||||
|
*--all*, *-a*
|
||||||
|
operate on all files in trash
|
||||||
|
|
||||||
|
*--original-path* dir, *-O* dir
|
||||||
|
remove files trashed from this directory
|
||||||
|
|
||||||
|
# GLOBAL FLAGS
|
||||||
|
|
||||||
|
*--confirm*, *-c*
|
||||||
|
ask for confirmation before executing any action
|
||||||
|
|
||||||
|
*--log* level, *-l* level
|
||||||
|
set log level
|
||||||
|
|
||||||
|
# FILTER FLAGS (USABLE WITH ALL COMMANDS)
|
||||||
|
|
||||||
|
*--match* pattern, *-m* pattern
|
||||||
|
operate on files matching regex pattern
|
||||||
|
|
||||||
|
*--glob* pattern, *-m* pattern
|
||||||
|
operate on files matching glob
|
||||||
|
|
||||||
|
*--not-match* pattern, *-M* pattern
|
||||||
|
operate on files not matching regex pattern
|
||||||
|
|
||||||
|
*--not-glob* pattern, *-G* pattern
|
||||||
|
operate on files not matching glob
|
||||||
|
|
||||||
|
*--on* date, *-O* date
|
||||||
|
operate on files modified on date
|
||||||
|
|
||||||
|
*--before* date, *-B* date
|
||||||
|
operate on files modified before date
|
||||||
|
|
||||||
|
*--after* date, *-A* date
|
||||||
|
operate on files modified after date
|
||||||
|
|
||||||
|
*--files-only*, *-F*
|
||||||
|
operate on files only
|
||||||
|
|
||||||
|
*--dirs-only*, *-D*
|
||||||
|
operate on directories only
|
||||||
|
|
||||||
|
*--min-size* size, *-N* size
|
||||||
|
operate on files larger than size
|
||||||
|
|
||||||
|
*--max-size* size, *-X* size
|
||||||
|
operate on files smaller than size
|
||||||
|
|
||||||
|
*--mode* mode, *-x* mode
|
||||||
|
operate on files matching mode mode
|
9
justfile
9
justfile
|
@ -30,6 +30,11 @@ run-args args:
|
||||||
install:
|
install:
|
||||||
go install {{cmd}}
|
go install {{cmd}}
|
||||||
|
|
||||||
|
# install manpages into $HOME/.local/share/man
|
||||||
|
install-man:
|
||||||
|
mkdir -p $HOME/.local/share/man/man1
|
||||||
|
cp {{binary}}.1 $HOME/.local/share/man/man1/{{binary}}.1
|
||||||
|
|
||||||
# clean up after yourself
|
# clean up after yourself
|
||||||
clean:
|
clean:
|
||||||
rm {{output}}
|
rm {{output}}
|
||||||
|
@ -41,3 +46,7 @@ test:
|
||||||
# run linter
|
# run linter
|
||||||
check:
|
check:
|
||||||
staticcheck ./...
|
staticcheck ./...
|
||||||
|
|
||||||
|
# generate manpage
|
||||||
|
man:
|
||||||
|
scdoc < {{binary}}.1.scd > {{binary}}.1
|
||||||
|
|
Loading…
Reference in a new issue