diff --git a/docs/usage/benchmark_crud.rst.inc b/docs/usage/benchmark_crud.rst.inc index 6f2d78c88..58d40970a 100644 --- a/docs/usage/benchmark_crud.rst.inc +++ b/docs/usage/benchmark_crud.rst.inc @@ -4,9 +4,9 @@ borg benchmark crud ------------------- -:: +.. code-block:: none - borg [common options] benchmark crud REPO PATH + borg [common options] benchmark crud [options] REPO PATH positional arguments REPO diff --git a/docs/usage/break-lock.rst.inc b/docs/usage/break-lock.rst.inc index f0bb1eacc..fe5dcc84c 100644 --- a/docs/usage/break-lock.rst.inc +++ b/docs/usage/break-lock.rst.inc @@ -4,9 +4,9 @@ borg break-lock --------------- -:: +.. code-block:: none - borg [common options] break-lock REPOSITORY + borg [common options] break-lock [options] REPOSITORY positional arguments REPOSITORY diff --git a/docs/usage/change-passphrase.rst.inc b/docs/usage/change-passphrase.rst.inc index b7addf3d6..29384d472 100644 --- a/docs/usage/change-passphrase.rst.inc +++ b/docs/usage/change-passphrase.rst.inc @@ -4,9 +4,9 @@ borg change-passphrase ---------------------- -:: +.. code-block:: none - borg [common options] change-passphrase REPOSITORY + borg [common options] change-passphrase [options] REPOSITORY positional arguments REPOSITORY diff --git a/docs/usage/check.rst.inc b/docs/usage/check.rst.inc index 08aef0868..7e021838e 100644 --- a/docs/usage/check.rst.inc +++ b/docs/usage/check.rst.inc @@ -4,9 +4,9 @@ borg check ---------- -:: +.. code-block:: none - borg [common options] check REPOSITORY_OR_ARCHIVE + borg [common options] check [options] REPOSITORY_OR_ARCHIVE positional arguments REPOSITORY_OR_ARCHIVE diff --git a/docs/usage/create.rst.inc b/docs/usage/create.rst.inc index dc6dc7f63..105df5cce 100644 --- a/docs/usage/create.rst.inc +++ b/docs/usage/create.rst.inc @@ -4,9 +4,9 @@ borg create ----------- -:: +.. code-block:: none - borg [common options] create ARCHIVE PATH + borg [common options] create [options] ARCHIVE PATH positional arguments ARCHIVE diff --git a/docs/usage/delete.rst.inc b/docs/usage/delete.rst.inc index ca8f12b33..d8f727f0d 100644 --- a/docs/usage/delete.rst.inc +++ b/docs/usage/delete.rst.inc @@ -4,9 +4,9 @@ borg delete ----------- -:: +.. code-block:: none - borg [common options] delete TARGET + borg [common options] delete [options] TARGET positional arguments TARGET diff --git a/docs/usage/diff.rst.inc b/docs/usage/diff.rst.inc index fe57eb051..74e703760 100644 --- a/docs/usage/diff.rst.inc +++ b/docs/usage/diff.rst.inc @@ -4,9 +4,9 @@ borg diff --------- -:: +.. code-block:: none - borg [common options] diff REPO_ARCHIVE1 ARCHIVE2 PATH + borg [common options] diff [options] REPO_ARCHIVE1 ARCHIVE2 PATH positional arguments REPO_ARCHIVE1 diff --git a/docs/usage/export-tar.rst.inc b/docs/usage/export-tar.rst.inc index cb81f9b29..845de54d2 100644 --- a/docs/usage/export-tar.rst.inc +++ b/docs/usage/export-tar.rst.inc @@ -4,9 +4,9 @@ borg export-tar --------------- -:: +.. code-block:: none - borg [common options] export-tar ARCHIVE FILE PATH + borg [common options] export-tar [options] ARCHIVE FILE PATH positional arguments ARCHIVE diff --git a/docs/usage/extract.rst.inc b/docs/usage/extract.rst.inc index 72fc0356e..4a63ffebc 100644 --- a/docs/usage/extract.rst.inc +++ b/docs/usage/extract.rst.inc @@ -4,9 +4,9 @@ borg extract ------------ -:: +.. code-block:: none - borg [common options] extract ARCHIVE PATH + borg [common options] extract [options] ARCHIVE PATH positional arguments ARCHIVE diff --git a/docs/usage/info.rst.inc b/docs/usage/info.rst.inc index a5fc65fe0..4c382f108 100644 --- a/docs/usage/info.rst.inc +++ b/docs/usage/info.rst.inc @@ -4,9 +4,9 @@ borg info --------- -:: +.. code-block:: none - borg [common options] info REPOSITORY_OR_ARCHIVE + borg [common options] info [options] REPOSITORY_OR_ARCHIVE positional arguments REPOSITORY_OR_ARCHIVE diff --git a/docs/usage/init.rst.inc b/docs/usage/init.rst.inc index a1fe3815e..1a5abcb68 100644 --- a/docs/usage/init.rst.inc +++ b/docs/usage/init.rst.inc @@ -4,9 +4,9 @@ borg init --------- -:: +.. code-block:: none - borg [common options] init REPOSITORY + borg [common options] init [options] REPOSITORY positional arguments REPOSITORY diff --git a/docs/usage/key_change-passphrase.rst.inc b/docs/usage/key_change-passphrase.rst.inc index aa0b92b55..91323a043 100644 --- a/docs/usage/key_change-passphrase.rst.inc +++ b/docs/usage/key_change-passphrase.rst.inc @@ -4,9 +4,9 @@ borg key change-passphrase -------------------------- -:: +.. code-block:: none - borg [common options] key change-passphrase REPOSITORY + borg [common options] key change-passphrase [options] REPOSITORY positional arguments REPOSITORY diff --git a/docs/usage/key_export.rst.inc b/docs/usage/key_export.rst.inc index 2d32b90b9..a0d7cf133 100644 --- a/docs/usage/key_export.rst.inc +++ b/docs/usage/key_export.rst.inc @@ -4,9 +4,9 @@ borg key export --------------- -:: +.. code-block:: none - borg [common options] key export REPOSITORY PATH + borg [common options] key export [options] REPOSITORY PATH positional arguments REPOSITORY diff --git a/docs/usage/key_import.rst.inc b/docs/usage/key_import.rst.inc index e60f5620f..86ab25b6a 100644 --- a/docs/usage/key_import.rst.inc +++ b/docs/usage/key_import.rst.inc @@ -4,9 +4,9 @@ borg key import --------------- -:: +.. code-block:: none - borg [common options] key import REPOSITORY PATH + borg [common options] key import [options] REPOSITORY PATH positional arguments REPOSITORY diff --git a/docs/usage/key_migrate-to-repokey.rst.inc b/docs/usage/key_migrate-to-repokey.rst.inc index 9f730137c..9acf215d6 100644 --- a/docs/usage/key_migrate-to-repokey.rst.inc +++ b/docs/usage/key_migrate-to-repokey.rst.inc @@ -4,9 +4,9 @@ borg key migrate-to-repokey --------------------------- -:: +.. code-block:: none - borg [common options] key migrate-to-repokey REPOSITORY + borg [common options] key migrate-to-repokey [options] REPOSITORY positional arguments REPOSITORY diff --git a/docs/usage/list.rst.inc b/docs/usage/list.rst.inc index d181721e5..8cb811526 100644 --- a/docs/usage/list.rst.inc +++ b/docs/usage/list.rst.inc @@ -4,9 +4,9 @@ borg list --------- -:: +.. code-block:: none - borg [common options] list REPOSITORY_OR_ARCHIVE PATH + borg [common options] list [options] REPOSITORY_OR_ARCHIVE PATH positional arguments REPOSITORY_OR_ARCHIVE diff --git a/docs/usage/mount.rst.inc b/docs/usage/mount.rst.inc index 57947a0b5..bfb0a24cb 100644 --- a/docs/usage/mount.rst.inc +++ b/docs/usage/mount.rst.inc @@ -4,9 +4,9 @@ borg mount ---------- -:: +.. code-block:: none - borg [common options] mount REPOSITORY_OR_ARCHIVE MOUNTPOINT + borg [common options] mount [options] REPOSITORY_OR_ARCHIVE MOUNTPOINT positional arguments REPOSITORY_OR_ARCHIVE diff --git a/docs/usage/prune.rst.inc b/docs/usage/prune.rst.inc index a1ef2a991..fb23c7fc4 100644 --- a/docs/usage/prune.rst.inc +++ b/docs/usage/prune.rst.inc @@ -4,9 +4,9 @@ borg prune ---------- -:: +.. code-block:: none - borg [common options] prune REPOSITORY + borg [common options] prune [options] REPOSITORY positional arguments REPOSITORY diff --git a/docs/usage/recreate.rst.inc b/docs/usage/recreate.rst.inc index 1bb72e8c8..7069423b6 100644 --- a/docs/usage/recreate.rst.inc +++ b/docs/usage/recreate.rst.inc @@ -4,9 +4,9 @@ borg recreate ------------- -:: +.. code-block:: none - borg [common options] recreate REPOSITORY_OR_ARCHIVE PATH + borg [common options] recreate [options] REPOSITORY_OR_ARCHIVE PATH positional arguments REPOSITORY_OR_ARCHIVE diff --git a/docs/usage/rename.rst.inc b/docs/usage/rename.rst.inc index ca2475fca..10d4d32ae 100644 --- a/docs/usage/rename.rst.inc +++ b/docs/usage/rename.rst.inc @@ -4,9 +4,9 @@ borg rename ----------- -:: +.. code-block:: none - borg [common options] rename ARCHIVE NEWNAME + borg [common options] rename [options] ARCHIVE NEWNAME positional arguments ARCHIVE diff --git a/docs/usage/serve.rst.inc b/docs/usage/serve.rst.inc index 0ac6a29ad..2bd87e108 100644 --- a/docs/usage/serve.rst.inc +++ b/docs/usage/serve.rst.inc @@ -4,9 +4,9 @@ borg serve ---------- -:: +.. code-block:: none - borg [common options] serve + borg [common options] serve [options] optional arguments ``--restrict-to-path PATH`` diff --git a/docs/usage/umount.rst.inc b/docs/usage/umount.rst.inc index 586d9f05a..45d2cb97e 100644 --- a/docs/usage/umount.rst.inc +++ b/docs/usage/umount.rst.inc @@ -4,9 +4,9 @@ borg umount ----------- -:: +.. code-block:: none - borg [common options] umount MOUNTPOINT + borg [common options] umount [options] MOUNTPOINT positional arguments MOUNTPOINT diff --git a/docs/usage/upgrade.rst.inc b/docs/usage/upgrade.rst.inc index b5ba44cc9..bbf51724b 100644 --- a/docs/usage/upgrade.rst.inc +++ b/docs/usage/upgrade.rst.inc @@ -4,9 +4,9 @@ borg upgrade ------------ -:: +.. code-block:: none - borg [common options] upgrade REPOSITORY + borg [common options] upgrade [options] REPOSITORY positional arguments REPOSITORY diff --git a/docs/usage/with-lock.rst.inc b/docs/usage/with-lock.rst.inc index c09ba9436..db5523b9a 100644 --- a/docs/usage/with-lock.rst.inc +++ b/docs/usage/with-lock.rst.inc @@ -4,9 +4,9 @@ borg with-lock -------------- -:: +.. code-block:: none - borg [common options] with-lock REPOSITORY COMMAND ARGS + borg [common options] with-lock [options] REPOSITORY COMMAND ARGS positional arguments REPOSITORY diff --git a/setup.py b/setup.py index e9f0bd28d..683799773 100644 --- a/setup.py +++ b/setup.py @@ -261,7 +261,7 @@ class build_usage(Command): "command_": command.replace(' ', '_'), "underline": '-' * len('borg ' + command)} doc.write(".. _borg_{command_}:\n\n".format(**params)) - doc.write("borg {command}\n{underline}\n::\n\n borg [common options] {command}".format(**params)) + doc.write("borg {command}\n{underline}\n.. code-block:: none\n\n borg [common options] {command}".format(**params)) self.write_usage(parser, doc) epilog = parser.epilog parser.epilog = None @@ -278,7 +278,7 @@ class build_usage(Command): def write_usage(self, parser, fp): if any(len(o.option_strings) for o in parser._actions): - fp.write(' ') + fp.write(' [options]') for option in parser._actions: if option.option_strings: continue