Skip to content

Commit

Permalink
docs: clarify requirements when using command line options with speci…
Browse files Browse the repository at this point in the history
…al characters within a shell (#8628)

docs: within a shell, cli options with special characters may require quoting, #8578
  • Loading branch information
goebbe authored Jan 11, 2025
1 parent 3a43b58 commit 4832364
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/borg/archiver/help_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ class HelpMixIn:
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 hash sign
'#' after removing whitespace on both ends are ignored. The optional style
Expand Down

0 comments on commit 4832364

Please sign in to comment.