about summary refs log tree commit diff stats
path: root/bash
diff options
context:
space:
mode:
authorCase Duckworth2022-03-13 05:32:13 +0000
committerCase Duckworth2022-03-13 05:32:13 +0000
commit9daa93094de07cd382d59affabd91cb1681d8375 (patch)
treed7b911c234958217329817b1f47e0a25145cf38e /bash
parentSource system profile (diff)
downloadetc-9daa93094de07cd382d59affabd91cb1681d8375.tar.gz
etc-9daa93094de07cd382d59affabd91cb1681d8375.zip
Accomodate more types of completion setups
Diffstat (limited to 'bash')
-rw-r--r--bash/completion.bash18
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 4POSSIBLE_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 10for 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
15done