rmeritz/dotfiles — pull request #2 by mike-burns (2013-08-11 21:09:07+00:00)
Title: Split .bashrc

Introduce `~/.sh.d` and `~/.bash.d` and have `.bashrc` load files from
there.

The reason for this split (general POSIX vs bash-specific) is to make it
easier to migrate to another POSIX-compatible shell (zsh, or even ash,
dash, pdksh), and to make it easier to share settings with other shell
users (such as wonderful zsh-using friends).

Loading files from a directory allows for more flexibility when tagging
files. For example, the aliases could be split into work- and
home-related aliases, and tagged as such, making it easier to install
exactly what you need.

The `~/.bash.d` directory also contains `pre/` and `post/` directories.
These allow for more fine-grained control, such as re-defining functions
or running commands when the system has fully loaded.

*Review notes:*

I left the comments as-is while moving settings around.

The `PS1` variable was set many times in multiple ways until finally being overwritten at the end of the `bashrc`. I've instead removed the many ways in which `PS1` was being set.

I've left the original `bash_aliases` clumped together in the `aliases` file. This should probably be split into smaller, better named files.