Merge pull request #8633 from goebbe/1.4-maint

docs: clarify requirements when using command line options with special characters within a shell #8628
This commit is contained in:
TW 2025-01-13 10:48:22 +01:00 committed by GitHub
commit 4344e64436
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2414,6 +2414,15 @@ class Archiver:
from within a shell, the patterns should be quoted to protect them from
expansion.
Patterns matching special characters, e.g. white space, within a shell may
require adjustments, such as putting quotation marks around the arguments.
Example:
Using bash, the following command line option would match and exclude "item name":
``--pattern='-path/item name'``
Note that when patterns are used within a pattern file directly read by borg,
e.g. when using ``--exclude-from`` or ``--patterns-from``, there is no shell
involved and thus no quotation marks are required.
The ``--exclude-from`` option permits loading exclusion patterns from a text
file with one pattern per line. Lines empty or starting with the number sign
('#') after removing whitespace on both ends are ignored. The optional style