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

#!/usr/bin/env bash
# shellcheck disable=SC1091
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
# shellcheck disable=SC1091
if [ -f /usr/local/etc/bash_completion ]; then
source /usr/local/etc/bash_completion
fi
COMPLETION_DIR=/usr/local/etc/bash_completion.d/
if [ -d "$COMPLETION_DIR" ]; then
# 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
fi
unset COMPLETION_DIR