Skip to content

Commit 7f0e81e

Browse files
committed
refactor: name files *.bash in in-tree bash_completion.d/
Mainly for easy allowlisting and backup avoidance in pre-commit configs. #886 (comment)
1 parent b577711 commit 7f0e81e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repos:
1212
hooks:
1313
- id: shfmt-docker
1414
types: [text]
15-
files: ^(bash_completion(\.d/[0-9]{3}_.+)?|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
15+
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
1616
exclude: ^completions/(\.gitignore|Makefile.*)$
1717

1818
- repo: https://github.com/shellcheck-py/shellcheck-py
@@ -21,7 +21,7 @@ repos:
2121
- id: shellcheck
2222
args: [-f, gcc]
2323
types: [text]
24-
files: ^(bash_completion(\.d/[0-9]{3}_.+)?|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
24+
files: ^(bash_completion(\.d/[^/]+\.bash)?|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
2525
exclude: ^completions/(\.gitignore|Makefile.*)$
2626
require_serial: false # We disable SC1090 anyway, so parallel is ok
2727

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pkgdata_DATA = bash_completion
44

55
# Empty, but here just to get the compat dir created with install
66
compatdir = $(sysconfdir)/bash_completion.d
7-
compat_DATA = bash_completion.d/000_bash_completion_compat
7+
compat_DATA = bash_completion.d/000_bash_completion_compat.bash
88

99
profiledir = $(sysconfdir)/profile.d
1010
profile_DATA = bash_completion.sh

0 commit comments

Comments
 (0)