diff options
author | Case Duckworth | 2022-03-13 05:32:13 +0000 |
---|---|---|
committer | Case Duckworth | 2022-03-13 05:32:13 +0000 |
commit | 9daa93094de07cd382d59affabd91cb1681d8375 (patch) | |
tree | d7b911c234958217329817b1f47e0a25145cf38e /bash | |
parent | Source system profile (diff) | |
download | etc-9daa93094de07cd382d59affabd91cb1681d8375.tar.gz etc-9daa93094de07cd382d59affabd91cb1681d8375.zip |
Accomodate more types of completion setups
Diffstat (limited to 'bash')
-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 | ||