You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
553 B
Bash
29 lines
553 B
Bash
5 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
4 years ago
|
# shellcheck disable=SC1091
|
||
4 years ago
|
if [ -f /etc/bash_completion ]; then
|
||
2 years ago
|
source /etc/bash_completion
|
||
4 years ago
|
fi
|
||
|
|
||
|
# shellcheck disable=SC1091
|
||
|
if [ -f /usr/local/etc/bash_completion ]; then
|
||
2 years ago
|
source /usr/local/etc/bash_completion
|
||
4 years ago
|
fi
|
||
|
|
||
5 years ago
|
COMPLETION_DIR=/usr/local/etc/bash_completion.d/
|
||
|
|
||
|
if [ -d "$COMPLETION_DIR" ]; then
|
||
2 years ago
|
# shellcheck disable=SC2045
|
||
|
for i in $(ls "$COMPLETION_DIR"); do
|
||
|
file="$COMPLETION_DIR/$i"
|
||
|
if [ -r "${file}" ]; then
|
||
|
# shellcheck disable=SC1090
|
||
|
source "${file}"
|
||
|
fi
|
||
|
unset file
|
||
|
done
|
||
|
unset i
|
||
5 years ago
|
fi
|
||
|
|
||
|
unset COMPLETION_DIR
|