These two major problems existed:
* PATH got multiple instances of the same entries for nested shells.
* MANPATH got set, but ignoring the results of the system's `manpath`
command. This caused some man pages to be missing, because the
presence of MANPATH variable prevents man from looking up man pages
at the paths returned from `manpath`.
Both issues are now fixed :)
BONUS: we abstract the last absolute locations we had in terms of where
Homebrew is installed. For Linux, Cygwin, or Mac without Homebrew we
assume all our custom tools will be installed under /usr/local. It is
easy enough to change that in case we have a different directory in a
specific system.
When the GNU version of `ls` is not installed (e.g. on a new Mac), the
previous alias causes problems because the --group-directories-first
option is not supported and makes `ls` fail. This commit fixes that by
checking which version is installed and creating the alias accordingly.
Since now the .bashrc is source from .bash_profile, the end result in
terms of what gets executed is the same. However, it is quicker to type
`vim .bashrc` when changing settings.