2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-22 04:45:15 +00:00

Update manpages and auto-completion

This commit is contained in:
Alexander Neumann 2017-09-26 13:16:08 +02:00
parent dad1c87afe
commit 4de938d97a
24 changed files with 1179 additions and 109 deletions

1121
doc/bash-completion.sh Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,78 +0,0 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.nh
.ad l
.SH NAME
.PP
restic\-autocomplete \- Generate shell autocompletion script
.SH SYNOPSIS
.PP
\fBrestic autocomplete [flags]\fP
.SH DESCRIPTION
.PP
The "autocomplete" command generates a shell autocompletion script.
.PP
NOTE: The current version supports Bash only.
This should work for *nix systems with Bash installed.
.PP
By default, the file is written directly to /etc/bash\_completion.d
for convenience, and the command may need superuser rights, e.g.:
.PP
$ sudo restic autocomplete
.SH OPTIONS
.PP
\fB\-\-completionfile\fP="/usr/share/bash\-completion/completions/restic"
autocompletion file
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for autocomplete
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-\-cache\-dir\fP=""
set the cache directory
.PP
\fB\-\-json\fP[=false]
set output mode to JSON for commands that support it
.PP
\fB\-\-no\-cache\fP[=false]
do not use a local cache
.PP
\fB\-\-no\-lock\fP[=false]
do not lock the repo, this allows some operations on read\-only repos
.PP
\fB\-o\fP, \fB\-\-option\fP=[]
set extended option (\fB\fCkey=value\fR, can be specified multiple times)
.PP
\fB\-p\fP, \fB\-\-password\-file\fP=""
read the repository password from a file (default: $RESTIC\_PASSWORD\_FILE)
.PP
\fB\-q\fP, \fB\-\-quiet\fP[=false]
do not output comprehensive progress report
.PP
\fB\-r\fP, \fB\-\-repo\fP=""
repository to backup to or restore from (default: $RESTIC\_REPOSITORY)
.SH SEE ALSO
.PP
\fBrestic(1)\fP

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,33 +1,40 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l
.SH NAME
.PP
restic\-manpage \- Generate manual pages
restic\-generate \- Generate manual pages and auto\-completion files (bash, zsh)
.SH SYNOPSIS
.PP
\fBrestic manpage [command] [flags]\fP
\fBrestic generate [command] [flags]\fP
.SH DESCRIPTION
.PP
The "manpage" command generates a manual page for a single command. It can also
be used to write all manual pages to a directory. If the output directory is
set and no command is specified, all manpages are written to the directory.
The "generate" command writes automatically generated files like the man pages
and the auto\-completion files for bash and zsh).
.SH OPTIONS
.PP
\fB\-h\fP, \fB\-\-help\fP[=false]
help for manpage
\fB\-\-bash\-completion\fP=""
write bash completion \fB\fCfile\fR
.PP
\fB\-\-output\-dir\fP=""
write man pages to this \fB\fCdirectory\fR
\fB\-h\fP, \fB\-\-help\fP[=false]
help for generate
.PP
\fB\-\-man\fP=""
write man pages to \fB\fCdirectory\fR
.PP
\fB\-\-zsh\-completion\fP=""
write zsh completion \fB\fCfile\fR
.SH OPTIONS INHERITED FROM PARENT COMMANDS

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l

View File

@ -1,4 +1,4 @@
.TH "restic backup" "1" "Jan 2017" "generated by `restic manpage`" ""
.TH "restic backup" "1" "Jan 2017" "generated by `restic generate`" ""
.nh
.ad l
@ -59,4 +59,4 @@ directories in an encrypted repository stored on different backends.
.SH SEE ALSO
.PP
\fBrestic\-autocomplete(1)\fP, \fBrestic\-backup(1)\fP, \fBrestic\-cat(1)\fP, \fBrestic\-check(1)\fP, \fBrestic\-dump(1)\fP, \fBrestic\-find(1)\fP, \fBrestic\-forget(1)\fP, \fBrestic\-init(1)\fP, \fBrestic\-key(1)\fP, \fBrestic\-list(1)\fP, \fBrestic\-ls(1)\fP, \fBrestic\-manpage(1)\fP, \fBrestic\-migrate(1)\fP, \fBrestic\-mount(1)\fP, \fBrestic\-prune(1)\fP, \fBrestic\-rebuild\-index(1)\fP, \fBrestic\-restore(1)\fP, \fBrestic\-snapshots(1)\fP, \fBrestic\-tag(1)\fP, \fBrestic\-unlock(1)\fP, \fBrestic\-version(1)\fP
\fBrestic\-backup(1)\fP, \fBrestic\-cat(1)\fP, \fBrestic\-check(1)\fP, \fBrestic\-dump(1)\fP, \fBrestic\-find(1)\fP, \fBrestic\-forget(1)\fP, \fBrestic\-generate(1)\fP, \fBrestic\-init(1)\fP, \fBrestic\-key(1)\fP, \fBrestic\-list(1)\fP, \fBrestic\-ls(1)\fP, \fBrestic\-migrate(1)\fP, \fBrestic\-mount(1)\fP, \fBrestic\-prune(1)\fP, \fBrestic\-rebuild\-index(1)\fP, \fBrestic\-restore(1)\fP, \fBrestic\-snapshots(1)\fP, \fBrestic\-tag(1)\fP, \fBrestic\-unlock(1)\fP, \fBrestic\-version(1)\fP

20
doc/zsh-completion.zsh Normal file
View File

@ -0,0 +1,20 @@
#compdef restic
_arguments \
'1: :->level1' \
'2: :_files'
case $state in
level1)
case $words[1] in
restic)
_arguments '1: :(backup cat check dump find forget generate help init key list ls migrate mount options prune rebuild-index restore snapshots tag unlock version)'
;;
*)
_arguments '*: :_files'
;;
esac
;;
*)
_arguments '*: :_files'
;;
esac