docs: usage: avoid bash highlight, [options] instead of <options>

This commit is contained in:
Marian Beermann 2017-06-07 00:44:53 +02:00
parent 22311abe02
commit 13adc80cde
25 changed files with 50 additions and 50 deletions

View file

@ -4,9 +4,9 @@
borg benchmark crud
-------------------
::
.. code-block:: none
borg [common options] benchmark crud <options> REPO PATH
borg [common options] benchmark crud [options] REPO PATH
positional arguments
REPO

View file

@ -4,9 +4,9 @@
borg break-lock
---------------
::
.. code-block:: none
borg [common options] break-lock <options> REPOSITORY
borg [common options] break-lock [options] REPOSITORY
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg change-passphrase
----------------------
::
.. code-block:: none
borg [common options] change-passphrase <options> REPOSITORY
borg [common options] change-passphrase [options] REPOSITORY
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg check
----------
::
.. code-block:: none
borg [common options] check <options> REPOSITORY_OR_ARCHIVE
borg [common options] check [options] REPOSITORY_OR_ARCHIVE
positional arguments
REPOSITORY_OR_ARCHIVE

View file

@ -4,9 +4,9 @@
borg create
-----------
::
.. code-block:: none
borg [common options] create <options> ARCHIVE PATH
borg [common options] create [options] ARCHIVE PATH
positional arguments
ARCHIVE

View file

@ -4,9 +4,9 @@
borg delete
-----------
::
.. code-block:: none
borg [common options] delete <options> TARGET
borg [common options] delete [options] TARGET
positional arguments
TARGET

View file

@ -4,9 +4,9 @@
borg diff
---------
::
.. code-block:: none
borg [common options] diff <options> REPO_ARCHIVE1 ARCHIVE2 PATH
borg [common options] diff [options] REPO_ARCHIVE1 ARCHIVE2 PATH
positional arguments
REPO_ARCHIVE1

View file

@ -4,9 +4,9 @@
borg export-tar
---------------
::
.. code-block:: none
borg [common options] export-tar <options> ARCHIVE FILE PATH
borg [common options] export-tar [options] ARCHIVE FILE PATH
positional arguments
ARCHIVE

View file

@ -4,9 +4,9 @@
borg extract
------------
::
.. code-block:: none
borg [common options] extract <options> ARCHIVE PATH
borg [common options] extract [options] ARCHIVE PATH
positional arguments
ARCHIVE

View file

@ -4,9 +4,9 @@
borg info
---------
::
.. code-block:: none
borg [common options] info <options> REPOSITORY_OR_ARCHIVE
borg [common options] info [options] REPOSITORY_OR_ARCHIVE
positional arguments
REPOSITORY_OR_ARCHIVE

View file

@ -4,9 +4,9 @@
borg init
---------
::
.. code-block:: none
borg [common options] init <options> REPOSITORY
borg [common options] init [options] REPOSITORY
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg key change-passphrase
--------------------------
::
.. code-block:: none
borg [common options] key change-passphrase <options> REPOSITORY
borg [common options] key change-passphrase [options] REPOSITORY
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg key export
---------------
::
.. code-block:: none
borg [common options] key export <options> REPOSITORY PATH
borg [common options] key export [options] REPOSITORY PATH
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg key import
---------------
::
.. code-block:: none
borg [common options] key import <options> REPOSITORY PATH
borg [common options] key import [options] REPOSITORY PATH
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg key migrate-to-repokey
---------------------------
::
.. code-block:: none
borg [common options] key migrate-to-repokey <options> REPOSITORY
borg [common options] key migrate-to-repokey [options] REPOSITORY
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg list
---------
::
.. code-block:: none
borg [common options] list <options> REPOSITORY_OR_ARCHIVE PATH
borg [common options] list [options] REPOSITORY_OR_ARCHIVE PATH
positional arguments
REPOSITORY_OR_ARCHIVE

View file

@ -4,9 +4,9 @@
borg mount
----------
::
.. code-block:: none
borg [common options] mount <options> REPOSITORY_OR_ARCHIVE MOUNTPOINT
borg [common options] mount [options] REPOSITORY_OR_ARCHIVE MOUNTPOINT
positional arguments
REPOSITORY_OR_ARCHIVE

View file

@ -4,9 +4,9 @@
borg prune
----------
::
.. code-block:: none
borg [common options] prune <options> REPOSITORY
borg [common options] prune [options] REPOSITORY
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg recreate
-------------
::
.. code-block:: none
borg [common options] recreate <options> REPOSITORY_OR_ARCHIVE PATH
borg [common options] recreate [options] REPOSITORY_OR_ARCHIVE PATH
positional arguments
REPOSITORY_OR_ARCHIVE

View file

@ -4,9 +4,9 @@
borg rename
-----------
::
.. code-block:: none
borg [common options] rename <options> ARCHIVE NEWNAME
borg [common options] rename [options] ARCHIVE NEWNAME
positional arguments
ARCHIVE

View file

@ -4,9 +4,9 @@
borg serve
----------
::
.. code-block:: none
borg [common options] serve <options>
borg [common options] serve [options]
optional arguments
``--restrict-to-path PATH``

View file

@ -4,9 +4,9 @@
borg umount
-----------
::
.. code-block:: none
borg [common options] umount <options> MOUNTPOINT
borg [common options] umount [options] MOUNTPOINT
positional arguments
MOUNTPOINT

View file

@ -4,9 +4,9 @@
borg upgrade
------------
::
.. code-block:: none
borg [common options] upgrade <options> REPOSITORY
borg [common options] upgrade [options] REPOSITORY
positional arguments
REPOSITORY

View file

@ -4,9 +4,9 @@
borg with-lock
--------------
::
.. code-block:: none
borg [common options] with-lock <options> REPOSITORY COMMAND ARGS
borg [common options] with-lock [options] REPOSITORY COMMAND ARGS
positional arguments
REPOSITORY

View file

@ -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(' <options>')
fp.write(' [options]')
for option in parser._actions:
if option.option_strings:
continue