Skip to content

Commit

Permalink
Update manpages and auto-completion
Browse files Browse the repository at this point in the history
  • Loading branch information
fd0 committed Jan 12, 2023
1 parent 099774c commit da196aa
Show file tree
Hide file tree
Showing 30 changed files with 664 additions and 138 deletions.
113 changes: 113 additions & 0 deletions doc/bash-completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,8 @@ _restic_backup()
local_nonpersistent_flags+=("--ignore-ctime")
flags+=("--ignore-inode")
local_nonpersistent_flags+=("--ignore-inode")
flags+=("--no-scan")
local_nonpersistent_flags+=("--no-scan")
flags+=("--one-file-system")
flags+=("-x")
local_nonpersistent_flags+=("--one-file-system")
Expand All @@ -444,6 +446,10 @@ _restic_backup()
two_word_flags+=("--parent")
local_nonpersistent_flags+=("--parent")
local_nonpersistent_flags+=("--parent=")
flags+=("--read-concurrency=")
two_word_flags+=("--read-concurrency")
local_nonpersistent_flags+=("--read-concurrency")
local_nonpersistent_flags+=("--read-concurrency=")
flags+=("--stdin")
local_nonpersistent_flags+=("--stdin")
flags+=("--stdin-filename=")
Expand Down Expand Up @@ -1256,6 +1262,10 @@ _restic_generate()
two_word_flags+=("--man")
local_nonpersistent_flags+=("--man")
local_nonpersistent_flags+=("--man=")
flags+=("--powershell-completion=")
two_word_flags+=("--powershell-completion")
local_nonpersistent_flags+=("--powershell-completion")
local_nonpersistent_flags+=("--powershell-completion=")
flags+=("--zsh-completion=")
two_word_flags+=("--zsh-completion")
local_nonpersistent_flags+=("--zsh-completion")
Expand Down Expand Up @@ -2083,6 +2093,8 @@ _restic_restore()
two_word_flags+=("--path")
local_nonpersistent_flags+=("--path")
local_nonpersistent_flags+=("--path=")
flags+=("--sparse")
local_nonpersistent_flags+=("--sparse")
flags+=("--tag=")
two_word_flags+=("--tag")
local_nonpersistent_flags+=("--tag")
Expand Down Expand Up @@ -2139,6 +2151,106 @@ _restic_restore()
noun_aliases=()
}

_restic_rewrite()
{
last_command="restic_rewrite"

command_aliases=()

commands=()

flags=()
two_word_flags=()
local_nonpersistent_flags=()
flags_with_completion=()
flags_completion=()

flags+=("--dry-run")
flags+=("-n")
local_nonpersistent_flags+=("--dry-run")
local_nonpersistent_flags+=("-n")
flags+=("--exclude=")
two_word_flags+=("--exclude")
two_word_flags+=("-e")
local_nonpersistent_flags+=("--exclude")
local_nonpersistent_flags+=("--exclude=")
local_nonpersistent_flags+=("-e")
flags+=("--exclude-file=")
two_word_flags+=("--exclude-file")
local_nonpersistent_flags+=("--exclude-file")
local_nonpersistent_flags+=("--exclude-file=")
flags+=("--forget")
local_nonpersistent_flags+=("--forget")
flags+=("--help")
flags+=("-h")
local_nonpersistent_flags+=("--help")
local_nonpersistent_flags+=("-h")
flags+=("--host=")
two_word_flags+=("--host")
two_word_flags+=("-H")
local_nonpersistent_flags+=("--host")
local_nonpersistent_flags+=("--host=")
local_nonpersistent_flags+=("-H")
flags+=("--iexclude=")
two_word_flags+=("--iexclude")
local_nonpersistent_flags+=("--iexclude")
local_nonpersistent_flags+=("--iexclude=")
flags+=("--iexclude-file=")
two_word_flags+=("--iexclude-file")
local_nonpersistent_flags+=("--iexclude-file")
local_nonpersistent_flags+=("--iexclude-file=")
flags+=("--path=")
two_word_flags+=("--path")
local_nonpersistent_flags+=("--path")
local_nonpersistent_flags+=("--path=")
flags+=("--tag=")
two_word_flags+=("--tag")
local_nonpersistent_flags+=("--tag")
local_nonpersistent_flags+=("--tag=")
flags+=("--cacert=")
two_word_flags+=("--cacert")
flags+=("--cache-dir=")
two_word_flags+=("--cache-dir")
flags+=("--cleanup-cache")
flags+=("--compression=")
two_word_flags+=("--compression")
flags+=("--insecure-tls")
flags+=("--json")
flags+=("--key-hint=")
two_word_flags+=("--key-hint")
flags+=("--limit-download=")
two_word_flags+=("--limit-download")
flags+=("--limit-upload=")
two_word_flags+=("--limit-upload")
flags+=("--no-cache")
flags+=("--no-lock")
flags+=("--option=")
two_word_flags+=("--option")
two_word_flags+=("-o")
flags+=("--pack-size=")
two_word_flags+=("--pack-size")
flags+=("--password-command=")
two_word_flags+=("--password-command")
flags+=("--password-file=")
two_word_flags+=("--password-file")
two_word_flags+=("-p")
flags+=("--quiet")
flags+=("-q")
flags+=("--repo=")
two_word_flags+=("--repo")
two_word_flags+=("-r")
flags+=("--repository-file=")
two_word_flags+=("--repository-file")
flags+=("--tls-client-cert=")
two_word_flags+=("--tls-client-cert")
flags+=("--verbose")
flags+=("-v")

must_have_one_flag=()
must_have_one_noun=()
noun_aliases=()
}

_restic_self-update()
{
last_command="restic_self-update"
Expand Down Expand Up @@ -2617,6 +2729,7 @@ _restic_root_command()
commands+=("rebuild-index")
commands+=("recover")
commands+=("restore")
commands+=("rewrite")
commands+=("self-update")
commands+=("snapshots")
commands+=("stats")
Expand Down
16 changes: 12 additions & 4 deletions doc/man/restic-backup.1
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea
\fB--ignore-inode\fP[=false]
ignore inode number changes when checking for modified files

.PP
\fB--no-scan\fP[=false]
do not run scanner to estimate size of backup

.PP
\fB-x\fP, \fB--one-file-system\fP[=false]
exclude other file systems, don't cross filesystem boundaries and subvolumes
Expand All @@ -97,6 +101,10 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea
\fB--parent\fP=""
use this parent \fB\fCsnapshot\fR (default: last snapshot in the repository that has the same target files/directories, and is not newer than the snapshot time)

.PP
\fB--read-concurrency\fP=0
read \fB\fCn\fR files concurrently (default: $RESTIC_READ_CONCURRENCY or 2)

.PP
\fB--stdin\fP[=false]
read backup from stdin
Expand Down Expand Up @@ -149,11 +157,11 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea

.PP
\fB--limit-download\fP=0
limits downloads to a maximum rate in KiB/s. (default: unlimited)
limits downloads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--limit-upload\fP=0
limits uploads to a maximum rate in KiB/s. (default: unlimited)
limits uploads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--no-cache\fP[=false]
Expand All @@ -169,7 +177,7 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea

.PP
\fB--pack-size\fP=0
set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
set target pack \fB\fCsize\fR in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)

.PP
\fB--password-command\fP=""
Expand Down Expand Up @@ -197,7 +205,7 @@ Exit status is 3 if some source data could not be read (incomplete snapshot crea

.PP
\fB-v\fP, \fB--verbose\fP[=0]
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 3)
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 2)


.SH SEE ALSO
Expand Down
8 changes: 4 additions & 4 deletions doc/man/restic-cache.1
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--limit-download\fP=0
limits downloads to a maximum rate in KiB/s. (default: unlimited)
limits downloads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--limit-upload\fP=0
limits uploads to a maximum rate in KiB/s. (default: unlimited)
limits uploads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--no-cache\fP[=false]
Expand All @@ -90,7 +90,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--pack-size\fP=0
set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
set target pack \fB\fCsize\fR in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)

.PP
\fB--password-command\fP=""
Expand Down Expand Up @@ -118,7 +118,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB-v\fP, \fB--verbose\fP[=0]
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 3)
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 2)


.SH SEE ALSO
Expand Down
8 changes: 4 additions & 4 deletions doc/man/restic-cat.1
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--limit-download\fP=0
limits downloads to a maximum rate in KiB/s. (default: unlimited)
limits downloads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--limit-upload\fP=0
limits uploads to a maximum rate in KiB/s. (default: unlimited)
limits uploads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--no-cache\fP[=false]
Expand All @@ -78,7 +78,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--pack-size\fP=0
set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
set target pack \fB\fCsize\fR in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)

.PP
\fB--password-command\fP=""
Expand Down Expand Up @@ -106,7 +106,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB-v\fP, \fB--verbose\fP[=0]
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 3)
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 2)


.SH SEE ALSO
Expand Down
8 changes: 4 additions & 4 deletions doc/man/restic-check.1
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--limit-download\fP=0
limits downloads to a maximum rate in KiB/s. (default: unlimited)
limits downloads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--limit-upload\fP=0
limits uploads to a maximum rate in KiB/s. (default: unlimited)
limits uploads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--no-cache\fP[=false]
Expand All @@ -95,7 +95,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--pack-size\fP=0
set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
set target pack \fB\fCsize\fR in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)

.PP
\fB--password-command\fP=""
Expand Down Expand Up @@ -123,7 +123,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB-v\fP, \fB--verbose\fP[=0]
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 3)
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 2)


.SH SEE ALSO
Expand Down
14 changes: 7 additions & 7 deletions doc/man/restic-copy.1
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ new destination repository using the "init" command.

.PP
\fB-H\fP, \fB--host\fP=[]
only consider snapshots for this \fB\fChost\fR, when no snapshot ID is given (can be specified multiple times)
only consider snapshots for this \fB\fChost\fR (can be specified multiple times)

.PP
\fB--path\fP=[]
only consider snapshots which include this (absolute) \fB\fCpath\fR, when no snapshot ID is given
only consider snapshots including this (absolute) \fB\fCpath\fR (can be specified multiple times)

.PP
\fB--tag\fP=[]
only consider snapshots which include this \fB\fCtaglist\fR, when no snapshot ID is given
only consider snapshots including \fB\fCtag[,tag,...]\fR (can be specified multiple times)


.SH OPTIONS INHERITED FROM PARENT COMMANDS
Expand Down Expand Up @@ -99,11 +99,11 @@ new destination repository using the "init" command.

.PP
\fB--limit-download\fP=0
limits downloads to a maximum rate in KiB/s. (default: unlimited)
limits downloads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--limit-upload\fP=0
limits uploads to a maximum rate in KiB/s. (default: unlimited)
limits uploads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--no-cache\fP[=false]
Expand All @@ -119,7 +119,7 @@ new destination repository using the "init" command.

.PP
\fB--pack-size\fP=0
set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
set target pack \fB\fCsize\fR in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)

.PP
\fB--password-command\fP=""
Expand Down Expand Up @@ -147,7 +147,7 @@ new destination repository using the "init" command.

.PP
\fB-v\fP, \fB--verbose\fP[=0]
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 3)
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 2)


.SH SEE ALSO
Expand Down
8 changes: 4 additions & 4 deletions doc/man/restic-diff.1
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--limit-download\fP=0
limits downloads to a maximum rate in KiB/s. (default: unlimited)
limits downloads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--limit-upload\fP=0
limits uploads to a maximum rate in KiB/s. (default: unlimited)
limits uploads to a maximum \fB\fCrate\fR in KiB/s. (default: unlimited)

.PP
\fB--no-cache\fP[=false]
Expand All @@ -98,7 +98,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB--pack-size\fP=0
set target pack size in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)
set target pack \fB\fCsize\fR in MiB, created pack files may be larger (default: $RESTIC_PACK_SIZE)

.PP
\fB--password-command\fP=""
Expand Down Expand Up @@ -126,7 +126,7 @@ Exit status is 0 if the command was successful, and non-zero if there was any er

.PP
\fB-v\fP, \fB--verbose\fP[=0]
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 3)
be verbose (specify multiple times or a level using --verbose=\fB\fCn\fR, max level/times is 2)


.SH SEE ALSO
Expand Down

0 comments on commit da196aa

Please sign in to comment.