Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify requirements when using command line options with special characters within a shell #8628

Merged
merged 3 commits into from
Jan 11, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
ThomasWaldmann marked this conversation as resolved.
Show resolved Hide resolved
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
Loading