2020-03-16 18:17:16 +00:00
|
|
|
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:
|
|
|
|
|
|
|
|
::
|
|
|
|
|
2022-06-23 23:19:19 +00:00
|
|
|
borg create -s --progress archive path # good and preferred
|
|
|
|
borg create archive path -s --progress # also works
|
|
|
|
borg create -s archive path --progress # works, but ugly
|
|
|
|
borg create archive -s --progress path # BAD
|
2020-03-16 18:17:16 +00:00
|
|
|
|
2020-12-19 19:11:32 +00:00
|
|
|
This is due to a problem in the argparse module: https://bugs.python.org/issue15112
|