mirror of
https://github.com/borgbackup/borg.git
synced 2026-05-28 04:03:21 -04:00
docs: usage: avoid bash highlight, [options] instead of <options>
This commit is contained in:
parent
22311abe02
commit
13adc80cde
25 changed files with 50 additions and 50 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
borg delete
|
||||
-----------
|
||||
::
|
||||
.. code-block:: none
|
||||
|
||||
borg [common options] delete <options> TARGET
|
||||
borg [common options] delete [options] TARGET
|
||||
|
||||
positional arguments
|
||||
TARGET
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
borg init
|
||||
---------
|
||||
::
|
||||
.. code-block:: none
|
||||
|
||||
borg [common options] init <options> REPOSITORY
|
||||
borg [common options] init [options] REPOSITORY
|
||||
|
||||
positional arguments
|
||||
REPOSITORY
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
borg prune
|
||||
----------
|
||||
::
|
||||
.. code-block:: none
|
||||
|
||||
borg [common options] prune <options> REPOSITORY
|
||||
borg [common options] prune [options] REPOSITORY
|
||||
|
||||
positional arguments
|
||||
REPOSITORY
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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``
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
borg umount
|
||||
-----------
|
||||
::
|
||||
.. code-block:: none
|
||||
|
||||
borg [common options] umount <options> MOUNTPOINT
|
||||
borg [common options] umount [options] MOUNTPOINT
|
||||
|
||||
positional arguments
|
||||
MOUNTPOINT
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
borg upgrade
|
||||
------------
|
||||
::
|
||||
.. code-block:: none
|
||||
|
||||
borg [common options] upgrade <options> REPOSITORY
|
||||
borg [common options] upgrade [options] REPOSITORY
|
||||
|
||||
positional arguments
|
||||
REPOSITORY
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
4
setup.py
4
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(' <options>')
|
||||
fp.write(' [options]')
|
||||
for option in parser._actions:
|
||||
if option.option_strings:
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue