Skip to content

Commit

Permalink
Merge pull request #8633 from goebbe/1.4-maint
Browse files Browse the repository at this point in the history
docs: clarify requirements when using command line options with special characters within a shell #8628
  • Loading branch information
ThomasWaldmann authored Jan 13, 2025
2 parents e8c618f + 15ec434 commit 4344e64
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/borg/archiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2414,6 +2414,15 @@ def do_break_lock(self, args, repository):
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
Expand Down

0 comments on commit 4344e64

Please sign in to comment.