From c7f5d5fd0be89021956bc288e1b3f420eccefc18 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Sun, 29 May 2022 10:49:33 -0700 Subject: [PATCH] Fix broken Bash completion of filenames, as in "-c config.yaml". --- borgmatic/commands/completion.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/borgmatic/commands/completion.py b/borgmatic/commands/completion.py index a9c787852..468c554d4 100644 --- a/borgmatic/commands/completion.py +++ b/borgmatic/commands/completion.py @@ -30,7 +30,7 @@ def bash_completion(): # Avert your eyes. return '\n'.join( ( - 'set -euo pipefail', + 'set -uo pipefail', 'check_version() {', ' local this_script="$(cat "$BASH_SOURCE" 2> /dev/null)"', ' local installed_script="$(borgmatic --bash-completion 2> /dev/null)"', @@ -53,6 +53,6 @@ def bash_completion(): % (actions, global_flags), ' (check_version &)', '}', - '\ncomplete -F complete_borgmatic borgmatic', + '\ncomplete -o bashdefault -o default -F complete_borgmatic borgmatic', ) )