diff options
-rw-r--r-- | bash/completion.bash | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/bash/completion.bash b/bash/completion.bash index 50e8f35..764463e 100644 --- a/bash/completion.bash +++ b/bash/completion.bash | |||
@@ -1,7 +1,15 @@ | |||
1 | # source completions | 1 | # Completions.bash |
2 | # Source bash completion libraries | ||
2 | 3 | ||
3 | . /etc/bash_completion | 4 | POSSIBLE_COMPLETION_FILES=( |
5 | /etc/bash_completion # Debian | ||
6 | /etc/profile.d/bash_completion.sh # Alpine | ||
7 | # I'm sure there are many more | ||
8 | ) | ||
4 | 9 | ||
5 | # for file in /etc/bash_completion.d/*; do | 10 | for candidate in "${POSSIBLE_COMPLETION_FILES[@]}"; do |
6 | # [ -r "$file" ] && source "$file" | 11 | if [[ -r "$candidate" ]]; then |
7 | # done | 12 | source "$candidate" |
13 | break # XXX: Do I want this? | ||
14 | fi | ||
15 | done | ||