Merge pull request #1230 from shayneholmes/update-short-help

Update style in short help commands
This commit is contained in:
Alexander Neumann 2017-09-11 22:25:31 +02:00
commit 0f25ef9498
47 changed files with 65 additions and 63 deletions

View file

@ -133,7 +133,7 @@ down to the following steps:
texts, the manual pages need to be regenerated and commited to the texts, the manual pages need to be regenerated and commited to the
repository. In order to do this, compile restic and save the generated repository. In order to do this, compile restic and save the generated
updated man pages in the subdir `doc/man` with the following command: updated man pages in the subdir `doc/man` with the following command:
`./restic manpages --output-dir doc/man` `./restic manpage --output-dir doc/man`
9. Once your code looks good and passes all the tests, we'll merge it. Thanks 9. Once your code looks good and passes all the tests, we'll merge it. Thanks
a lot for your contribution! a lot for your contribution!

View file

@ -8,7 +8,7 @@ var autocompleteTarget string
var cmdAutocomplete = &cobra.Command{ var cmdAutocomplete = &cobra.Command{
Use: "autocomplete", Use: "autocomplete",
Short: "generate shell autocompletion script", Short: "Generate shell autocompletion script",
Long: `The "autocomplete" command generates a shell autocompletion script. Long: `The "autocomplete" command generates a shell autocompletion script.
NOTE: The current version supports Bash only. NOTE: The current version supports Bash only.

View file

@ -21,7 +21,7 @@ import (
var cmdBackup = &cobra.Command{ var cmdBackup = &cobra.Command{
Use: "backup [flags] FILE/DIR [FILE/DIR] ...", Use: "backup [flags] FILE/DIR [FILE/DIR] ...",
Short: "create a new backup of files and/or directories", Short: "Create a new backup of files and/or directories",
Long: ` Long: `
The "backup" command creates a new snapshot and saves the files and directories The "backup" command creates a new snapshot and saves the files and directories
given as the arguments. given as the arguments.

View file

@ -16,7 +16,7 @@ import (
var cmdCat = &cobra.Command{ var cmdCat = &cobra.Command{
Use: "cat [flags] [pack|blob|snapshot|index|key|masterkey|config|lock] ID", Use: "cat [flags] [pack|blob|snapshot|index|key|masterkey|config|lock] ID",
Short: "print internal objects to stdout", Short: "Print internal objects to stdout",
Long: ` Long: `
The "cat" command is used to print internal objects to stdout. The "cat" command is used to print internal objects to stdout.
`, `,

View file

@ -15,7 +15,7 @@ import (
var cmdCheck = &cobra.Command{ var cmdCheck = &cobra.Command{
Use: "check [flags]", Use: "check [flags]",
Short: "check the repository for errors", Short: "Check the repository for errors",
Long: ` Long: `
The "check" command tests the repository for errors and reports any errors it The "check" command tests the repository for errors and reports any errors it
finds. It can also be used to read all data and therefore simulate a restore. finds. It can also be used to read all data and therefore simulate a restore.

View file

@ -21,7 +21,7 @@ import (
var cmdDump = &cobra.Command{ var cmdDump = &cobra.Command{
Use: "dump [indexes|snapshots|trees|all|packs]", Use: "dump [indexes|snapshots|trees|all|packs]",
Short: "dump data structures", Short: "Dump data structures",
Long: ` Long: `
The "dump" command dumps data structures from the repository as JSON objects. It The "dump" command dumps data structures from the repository as JSON objects. It
is used for debugging purposes only.`, is used for debugging purposes only.`,

View file

@ -16,7 +16,7 @@ import (
var cmdFind = &cobra.Command{ var cmdFind = &cobra.Command{
Use: "find [flags] PATTERN", Use: "find [flags] PATTERN",
Short: "find a file or directory", Short: "Find a file or directory",
Long: ` Long: `
The "find" command searches for files or directories in snapshots stored in the The "find" command searches for files or directories in snapshots stored in the
repo. `, repo. `,

View file

@ -13,7 +13,7 @@ import (
var cmdForget = &cobra.Command{ var cmdForget = &cobra.Command{
Use: "forget [flags] [snapshot ID] [...]", Use: "forget [flags] [snapshot ID] [...]",
Short: "forget removes snapshots from the repository", Short: "Remove snapshots from the repository",
Long: ` Long: `
The "forget" command removes snapshots according to a policy. Please note that The "forget" command removes snapshots according to a policy. Please note that
this command really only deletes the snapshot object in the repository, which this command really only deletes the snapshot object in the repository, which

View file

@ -11,7 +11,7 @@ import (
var cmdInit = &cobra.Command{ var cmdInit = &cobra.Command{
Use: "init", Use: "init",
Short: "initialize a new repository", Short: "Initialize a new repository",
Long: ` Long: `
The "init" command initializes a new repository. The "init" command initializes a new repository.
`, `,

View file

@ -13,7 +13,7 @@ import (
var cmdKey = &cobra.Command{ var cmdKey = &cobra.Command{
Use: "key [list|add|remove|passwd] [ID]", Use: "key [list|add|remove|passwd] [ID]",
Short: "manage keys (passwords)", Short: "Manage keys (passwords)",
Long: ` Long: `
The "key" command manages keys (passwords) for accessing the repository. The "key" command manages keys (passwords) for accessing the repository.
`, `,

View file

@ -13,7 +13,7 @@ import (
var cmdList = &cobra.Command{ var cmdList = &cobra.Command{
Use: "list [blobs|packs|index|snapshots|keys|locks]", Use: "list [blobs|packs|index|snapshots|keys|locks]",
Short: "list objects in the repository", Short: "List objects in the repository",
Long: ` Long: `
The "list" command allows listing objects in the repository based on type. The "list" command allows listing objects in the repository based on type.
`, `,

View file

@ -13,7 +13,7 @@ import (
var cmdLs = &cobra.Command{ var cmdLs = &cobra.Command{
Use: "ls [flags] [snapshot-ID ...]", Use: "ls [flags] [snapshot-ID ...]",
Short: "list files in a snapshot", Short: "List files in a snapshot",
Long: ` Long: `
The "ls" command allows listing files and directories in a snapshot. The "ls" command allows listing files and directories in a snapshot.

View file

@ -11,7 +11,7 @@ import (
var cmdManpage = &cobra.Command{ var cmdManpage = &cobra.Command{
Use: "manpage [command]", Use: "manpage [command]",
Short: "generate manual pages", Short: "Generate manual pages",
Long: ` Long: `
The "manpage" command generates a manual page for a single command. It can also 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 be used to write all manual pages to a directory. If the output directory is

View file

@ -9,7 +9,7 @@ import (
var cmdMigrate = &cobra.Command{ var cmdMigrate = &cobra.Command{
Use: "migrate [name]", Use: "migrate [name]",
Short: "apply migrations", Short: "Apply migrations",
Long: ` Long: `
The "migrate" command applies migrations to a repository. When no migration The "migrate" command applies migrations to a repository. When no migration
name is explicitly given, a list of migrations that can be applied is printed. name is explicitly given, a list of migrations that can be applied is printed.

View file

@ -22,7 +22,7 @@ import (
var cmdMount = &cobra.Command{ var cmdMount = &cobra.Command{
Use: "mount [flags] mountpoint", Use: "mount [flags] mountpoint",
Short: "mount the repository", Short: "Mount the repository",
Long: ` Long: `
The "mount" command mounts the repository via fuse to a directory. This is a The "mount" command mounts the repository via fuse to a directory. This is a
read-only mount. read-only mount.

View file

@ -10,7 +10,7 @@ import (
var optionsCmd = &cobra.Command{ var optionsCmd = &cobra.Command{
Use: "options", Use: "options",
Short: "print list of extended options", Short: "Print list of extended options",
Long: ` Long: `
The "options" command prints a list of extended options. The "options" command prints a list of extended options.
`, `,

View file

@ -15,7 +15,7 @@ import (
var cmdPrune = &cobra.Command{ var cmdPrune = &cobra.Command{
Use: "prune [flags]", Use: "prune [flags]",
Short: "remove unneeded data from the repository", Short: "Remove unneeded data from the repository",
Long: ` Long: `
The "prune" command checks the repository and removes data that is not The "prune" command checks the repository and removes data that is not
referenced and therefore not needed any more. referenced and therefore not needed any more.

View file

@ -11,7 +11,7 @@ import (
var cmdRebuildIndex = &cobra.Command{ var cmdRebuildIndex = &cobra.Command{
Use: "rebuild-index [flags]", Use: "rebuild-index [flags]",
Short: "build a new index file", Short: "Build a new index file",
Long: ` Long: `
The "rebuild-index" command creates a new index based on the pack files in the The "rebuild-index" command creates a new index based on the pack files in the
repository. repository.

View file

@ -11,7 +11,7 @@ import (
var cmdRestore = &cobra.Command{ var cmdRestore = &cobra.Command{
Use: "restore [flags] snapshotID", Use: "restore [flags] snapshotID",
Short: "extract the data from a snapshot", Short: "Extract the data from a snapshot",
Long: ` Long: `
The "restore" command extracts the data from a snapshot from the repository to The "restore" command extracts the data from a snapshot from the repository to
a directory. a directory.

View file

@ -13,7 +13,7 @@ import (
var cmdSnapshots = &cobra.Command{ var cmdSnapshots = &cobra.Command{
Use: "snapshots [snapshotID ...]", Use: "snapshots [snapshotID ...]",
Short: "list all snapshots", Short: "List all snapshots",
Long: ` Long: `
The "snapshots" command lists all snapshots stored in the repository. The "snapshots" command lists all snapshots stored in the repository.
`, `,

View file

@ -13,7 +13,7 @@ import (
var cmdTag = &cobra.Command{ var cmdTag = &cobra.Command{
Use: "tag [flags] [snapshot-ID ...]", Use: "tag [flags] [snapshot-ID ...]",
Short: "modifies tags on snapshots", Short: "Modify tags on snapshots",
Long: ` Long: `
The "tag" command allows you to modify tags on exiting snapshots. The "tag" command allows you to modify tags on exiting snapshots.

View file

@ -9,7 +9,7 @@ import (
var unlockCmd = &cobra.Command{ var unlockCmd = &cobra.Command{
Use: "unlock", Use: "unlock",
Short: "remove locks other processes created", Short: "Remove locks other processes created",
Long: ` Long: `
The "unlock" command removes stale locks that have been created by other restic processes. The "unlock" command removes stale locks that have been created by other restic processes.
`, `,

View file

@ -9,7 +9,7 @@ import (
var versionCmd = &cobra.Command{ var versionCmd = &cobra.Command{
Use: "version", Use: "version",
Short: "print version information", Short: "Print version information",
Long: ` Long: `
The "version" command prints detailed information about the build environment The "version" command prints detailed information about the build environment
and the version of this software. and the version of this software.

View file

@ -20,7 +20,7 @@ import (
// cmdRoot is the base command when no other command has been specified. // cmdRoot is the base command when no other command has been specified.
var cmdRoot = &cobra.Command{ var cmdRoot = &cobra.Command{
Use: "restic", Use: "restic",
Short: "backup and restore files", Short: "Backup and restore files",
Long: ` Long: `
restic is a backup program which allows saving multiple revisions of files and restic is a backup program which allows saving multiple revisions of files and
directories in an encrypted repository stored on different backends. directories in an encrypted repository stored on different backends.

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-autocomplete \- generate shell autocompletion script restic\-autocomplete \- Generate shell autocompletion script
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-backup \- create a new backup of files and/or directories restic\-backup \- Create a new backup of files and/or directories
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-cat \- print internal objects to stdout restic\-cat \- Print internal objects to stdout
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-check \- check the repository for errors restic\-check \- Check the repository for errors
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-dump \- dump data structures restic\-dump \- Dump data structures
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-find \- find a file or directory restic\-find \- Find a file or directory
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-forget \- forget removes snapshots from the repository restic\-forget \- Remove snapshots from the repository
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-init \- initialize a new repository restic\-init \- Initialize a new repository
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-key \- manage keys (passwords) restic\-key \- Manage keys (passwords)
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-list \- list objects in the repository restic\-list \- List objects in the repository
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-ls \- list files in a snapshot restic\-ls \- List files in a snapshot
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-manpage \- generate manual pages restic\-manpage \- Generate manual pages
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-migrate \- apply migrations restic\-migrate \- Apply migrations
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-mount \- mount the repository restic\-mount \- Mount the repository
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-prune \- remove unneeded data from the repository restic\-prune \- Remove unneeded data from the repository
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-rebuild\-index \- build a new index file restic\-rebuild\-index \- Build a new index file
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-restore \- extract the data from a snapshot restic\-restore \- Extract the data from a snapshot
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-snapshots \- list all snapshots restic\-snapshots \- List all snapshots
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-tag \- modifies tags on snapshots restic\-tag \- Modify tags on snapshots
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-unlock \- remove locks other processes created restic\-unlock \- Remove locks other processes created
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic\-version \- print version information restic\-version \- Print version information
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -5,7 +5,7 @@
.SH NAME .SH NAME
.PP .PP
restic \- backup and restore files restic \- Backup and restore files
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -16,23 +16,25 @@ Usage help is available:
restic [command] restic [command]
Available Commands: Available Commands:
autocomplete generate shell autocompletion script autocomplete Generate shell autocompletion script
backup create a new backup of files and/or directories backup Create a new backup of files and/or directories
cat print internal objects to stdout cat Print internal objects to stdout
check check the repository for errors check Check the repository for errors
find find a file or directory dump Dump data structures
forget forget removes snapshots from the repository find Find a file or directory
init initialize a new repository forget Remove snapshots from the repository
key manage keys (passwords) help Help about any command
list list items in the repository init Initialize a new repository
ls list files in a snapshot key Manage keys (passwords)
mount mount the repository list List items in the repository
prune remove unneeded data from the repository ls List files in a snapshot
rebuild-index build a new index file mount Mount the repository
restore extract the data from a snapshot prune Remove unneeded data from the repository
snapshots list all snapshots rebuild-index Build a new index file
tag modifies tags on snapshots restore Extract the data from a snapshot
unlock remove locks other processes created snapshots List all snapshots
tag Modify tags on snapshots
unlock Remove locks other processes created
version Print version information version Print version information
Flags: Flags: