After a quick www.shellcheck.net review:

for file in ~/.bashrc.d/*.bashrc;
do
source “${file}”
done

Iterating over ls results is notoriously tricky. Also, always quote your variables. More importantly, never use a bash script you haven’t checked with shellcheck (in addition to the online version, you can install it locally and there are tons of nifty integrations to editors and IDEs

)

    Clément Delafargue

    Written by

    Brittany, FP, feminism, cute baby animals. Not necessarily in this order.