bash: source all files under ~/.local/etc/bash

This commit is contained in:
Fernando Schauenburg 2020-12-16 00:33:15 +01:00
parent eb2662d1dc
commit 81c785f04b

View file

@ -444,11 +444,15 @@ colortest() {
stty -ixon # disable ctrl-s and ctrl-q stty -ixon # disable ctrl-s and ctrl-q
_update_colors "${BACKGROUND:-dark}" _update_colors "${BACKGROUND:-dark}"
# shellcheck disable=SC1090 _source_extra_configs() {
while read -r f; do [ -f "$f" ] && source "$f"; done <<EOF local configs=(
/usr/local/etc/profile.d/bash_completion.sh /usr/local/etc/profile.d/bash_completion.sh
/usr/share/bash-completion/bash_completion /usr/share/bash-completion/bash_completion
$LOCAL_CONFIG/bash/profile $LOCAL_CONFIG/bash/*
EOF )
unset f local f
for f in ${configs[@]}; do [ -f "$f" ] && source "$f"; done
}
_source_extra_configs
true