#!/usr/bin/env bash 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 # shellcheck disable=SC1091 [[ -f /usr/local/etc/bash_completion ]] && source /usr/local/etc/bash_completion unset COMPLETION_DIR