uniformizing shell config

This commit is contained in:
Loic Nageleisen 2012-08-10 14:15:13 +02:00
parent 65be65d4d6
commit a0f8f48016
6 changed files with 81 additions and 58 deletions

View file

@ -1,13 +1,14 @@
## bash_profile
## bash_profile, called for login shells
# handle .profile too
. ~/.profile
# dotfiles locations
DOTFILES_HOME_DIR="$(cd -P "$(dirname "$(readlink ${BASH_SOURCE[0]})")" && pwd)"
DOTFILES_ROOT_DIR="$( dirname "$DOTFILES_HOME_DIR" )"
DOTFILES_BASH_DIR="$DOTFILES_ROOT_DIR/bash"
# homebrew bash autocompletion
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# include .profile
source ~/.profile
# execute bashrc
[ -n "$BASH" ] && . ~/.bashrc
# include bashrc too if this is an interactive shell
[[ $- == *i* ]] && source ~/.bashrc
# vim: ft=sh