From 15ec434b50a871e5dfb1d49bee60446a04256813 Mon Sep 17 00:00:00 2001 From: goebbe <35854226+goebbe@users.noreply.github.com> Date: Mon, 13 Jan 2025 08:19:53 +0100 Subject: [PATCH] docs: clarify requirements when using command line options with special characters within a shell #8628 docs: clarify requirements when using command line options with special characters within a shell #8628 port to the 1.4-maint branch --- src/borg/archiver.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/borg/archiver.py b/src/borg/archiver.py index bbdfe523df..cb159d553a 100644 --- a/src/borg/archiver.py +++ b/src/borg/archiver.py @@ -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