File: positional-arguments.rst.inc

package info (click to toggle)
borgbackup 1.4.3-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,728 kB
  • sloc: python: 26,637; pascal: 3,245; ansic: 2,597; sh: 151; makefile: 133; tcl: 94
file content (15 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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: https://bugs.python.org/issue15112