3 ms·
One thing I do is to put this snippet in .bashrc or .profile for i in ${HOME}/.bash.d/*.sh do if [ -r ${i} ] ; then . ${i} fi done An
by carl-erwin 8y ago
One thing I do is to put this snippet in .bashrc or .profile
for i in ${HOME}/.bash.d/*.sh
do
if [ -r ${i} ] ; then
. ${i}
fi
done
And drop some custom scripts in ${HOME}/.bash.d/
like alias.sh, env.sh
(my common .bash.d scripts are saved in a git repository)
- ob6160 8y agoWhoa, I know someone who does exactly this. Is this a common pattern? Unless you're him!
- nailer 8y ago.d is a common Unix include directory pattern. See cron.d, xinetrc.d, conf.d etc. Packages can just add/remove things to the include dir rather than modifying the main config.
- stevekemp 8y agoI do that in my dotfiles too: The main include: https://github.com/skx/dotfiles/blob/master/.bashrc https://github.com/skx/dotfiles/blob/master/.bashrc The actual dotfiles: https://github.com/skx/dotfiles/ https://github.com/skx/dotfiles/ (People usually copy the literate emacs configuration ..)