소스 검색

Fix broken Bash completion of filenames, as in "-c config.yaml".

Dan Helfman 3 년 전
부모
커밋
c7f5d5fd0b
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      borgmatic/commands/completion.py

+ 2 - 2
borgmatic/commands/completion.py

@@ -30,7 +30,7 @@ def bash_completion():
     # Avert your eyes.
     # Avert your eyes.
     return '\n'.join(
     return '\n'.join(
         (
         (
-            'set -euo pipefail',
+            'set -uo pipefail',
             'check_version() {',
             'check_version() {',
             '    local this_script="$(cat "$BASH_SOURCE" 2> /dev/null)"',
             '    local this_script="$(cat "$BASH_SOURCE" 2> /dev/null)"',
             '    local installed_script="$(borgmatic --bash-completion 2> /dev/null)"',
             '    local installed_script="$(borgmatic --bash-completion 2> /dev/null)"',
@@ -53,6 +53,6 @@ def bash_completion():
             % (actions, global_flags),
             % (actions, global_flags),
             '    (check_version &)',
             '    (check_version &)',
             '}',
             '}',
-            '\ncomplete -F complete_borgmatic borgmatic',
+            '\ncomplete -o bashdefault -o default -F complete_borgmatic borgmatic',
         )
         )
     )
     )