Hacker News new | past | comments | ask | show | jobs | submit login

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)




Whoa, I know someone who does exactly this. Is this a common pattern?

Unless you're him!


.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.


I do that in my dotfiles too:

The main include:

https://github.com/skx/dotfiles/blob/master/.bashrc

The actual dotfiles:

https://github.com/skx/dotfiles/

(People usually copy the literate emacs configuration ..)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: