From 0a0e4e18fd7826e42ee980a4c6b0010d3959eabb Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Wed, 19 Nov 2025 02:59:34 +0100 Subject: [PATCH] completion: support PathSpec --- src/borg/archiver/completion_cmd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/borg/archiver/completion_cmd.py b/src/borg/archiver/completion_cmd.py index 6f353cce8..408c61bab 100644 --- a/src/borg/archiver/completion_cmd.py +++ b/src/borg/archiver/completion_cmd.py @@ -4,7 +4,7 @@ import shtab from ._common import process_epilog from ..constants import * # NOQA -from ..helpers import archivename_validator, SortBySpec, FilesCacheMode +from ..helpers import archivename_validator, SortBySpec, FilesCacheMode, PathSpec from ..compress import CompressionSpec from ..helpers.parseformat import partial_format from ..manifest import AI_HUMAN_SORT_KEYS @@ -418,6 +418,7 @@ class CompletionMixIn: CompressionSpec, {"bash": "_borg_complete_compression_spec", "zsh": "_borg_complete_compression_spec"}, ) + _attach_completion(parser, PathSpec, shtab.DIRECTORY) # Collect all commands and help topics for "borg help" completion help_choices = list(self.helptext.keys())