positional-arguments.rst.inc 645 B

123456789101112131415
  1. Positional Arguments and Options: Order matters
  2. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  3. Borg only supports taking options (``-s`` and ``--progress`` in the example)
  4. to the left or right of all positional arguments (``repo::archive`` and ``path``
  5. in the example), but not in between them:
  6. ::
  7. borg create -s --progress repo::archive path # good and preferred
  8. borg create repo::archive path -s --progress # also works
  9. borg create -s repo::archive path --progress # works, but ugly
  10. borg create repo::archive -s --progress path # BAD
  11. This is due to a problem in the argparse module: https://bugs.python.org/issue15112