From 65b2fe86c684d6754d599c74885b33ee4d263249 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Thu, 9 Jun 2022 16:29:54 -0700 Subject: [PATCH] Fix Bash completion script to no longer alter your shell's settings. --- NEWS | 2 ++ borgmatic/commands/completion.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index c640d134b..d7d9a6e95 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ https://torsion.org/borgmatic/docs/how-to/inspect-your-backups/#searching-for-a-file * #543: Add a monitoring hook for sending push notifications via ntfy. See the documentation for more information: https://torsion.org/borgmatic/docs/how-to/monitor-your-backups/#ntfy-hook + * Fix Bash completion script to no longer alter your shell's settings (complain about unset + variables or error on pipe failures). * Deprecate "borgmatic list --successful" flag, as listing only non-checkpoint (successful) archives is now the default in newer versions of Borg. diff --git a/borgmatic/commands/completion.py b/borgmatic/commands/completion.py index 468c554d4..0ff1f3e50 100644 --- a/borgmatic/commands/completion.py +++ b/borgmatic/commands/completion.py @@ -30,7 +30,6 @@ def bash_completion(): # Avert your eyes. return '\n'.join( ( - 'set -uo pipefail', 'check_version() {', ' local this_script="$(cat "$BASH_SOURCE" 2> /dev/null)"', ' local installed_script="$(borgmatic --bash-completion 2> /dev/null)"',