Browse Source

Fix Bash completion script to no longer alter your shell's settings.

Dan Helfman 3 years ago
parent
commit
65b2fe86c6
2 changed files with 2 additions and 1 deletions
  1. 2 0
      NEWS
  2. 0 1
      borgmatic/commands/completion.py

+ 2 - 0
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.
 

+ 0 - 1
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)"',