mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-28 02:38:43 +00:00
docs: document good and problematic option placements, see #3356
(cherry picked from commit e3cb7c3c32
)
This commit is contained in:
parent
938d122191
commit
21afd17f2f
1 changed files with 17 additions and 0 deletions
|
@ -1,3 +1,20 @@
|
||||||
|
Positional Arguments and Options: Order matters
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Borg only supports taking options (``-s`` and ``--progress`` in the example)
|
||||||
|
to the left or right of all positional arguments (``repo::archive`` and ``path``
|
||||||
|
in the example), but not in between them:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
borg create -s --progress repo::archive path # good and preferred
|
||||||
|
borg create repo::archive path -s --progress # also works
|
||||||
|
borg create -s repo::archive path --progress # works, but ugly
|
||||||
|
borg create repo::archive -s --progress path # BAD
|
||||||
|
|
||||||
|
This is due to a problem in the argparse module: http://bugs.python.org/issue15112
|
||||||
|
|
||||||
|
|
||||||
Repository URLs
|
Repository URLs
|
||||||
~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue