2012-06-18 01:10:31 +02:00
|
|
|
########################################################################
|
|
|
|
# bash_profile, basically from the whole internet
|
|
|
|
# and a lot from @necolas, @mathiasbynens & @rtomayko
|
2013-01-27 11:24:46 +01:00
|
|
|
#
|
2012-06-18 01:10:31 +02:00
|
|
|
# https://github.com/mathiasbynens/dotfiles
|
|
|
|
# https://github.com/necolas/dotfiles
|
|
|
|
# https://github.com/rtomayko/dotfiles
|
|
|
|
########################################################################
|
|
|
|
|
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
2012-06-25 18:51:11 +02:00
|
|
|
# Load ~/.private, ~/.bash_prompt
|
2012-06-18 01:10:31 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
2014-09-01 10:59:24 +02:00
|
|
|
for file in ~/.{bash_prompt,aliases,private,inputrc}; do
|
2013-10-05 13:31:13 +02:00
|
|
|
[ -r "$file" ] && [ -f "$file" ] && source "$file"
|
2014-09-01 10:59:24 +02:00
|
|
|
done;
|
|
|
|
unset file;
|
2012-06-18 01:10:31 +02:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# SHELL OPTIONS
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
2012-07-15 05:26:24 +02:00
|
|
|
# Append to the Bash history file, rather than overwriting it
|
|
|
|
shopt -s histappend
|
|
|
|
|
|
|
|
# Prefer US English and use UTF-8
|
|
|
|
export LC_ALL="en_US.UTF-8"
|
|
|
|
export LANG="en_US"
|
|
|
|
|
2012-06-18 01:10:31 +02:00
|
|
|
# fuck that you have new mail shit
|
|
|
|
unset MAILCHECK
|
|
|
|
|
2014-05-23 16:11:05 +02:00
|
|
|
# Case-insensitive globbing (used in pathname expansion)
|
|
|
|
shopt -s nocaseglob
|
|
|
|
|
|
|
|
# Autocorrect typos in path names when using `cd`
|
|
|
|
shopt -s cdspell
|
|
|
|
|
2014-09-01 10:59:24 +02:00
|
|
|
# Enable some Bash 4 features when possible:
|
|
|
|
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
|
|
|
|
# * Recursive globbing, e.g. `echo **/*.txt`
|
|
|
|
for option in autocd globstar; do
|
|
|
|
shopt -s "$option" 2> /dev/null;
|
|
|
|
done;
|
|
|
|
|
2014-05-23 16:11:05 +02:00
|
|
|
# Add tab completion for many Bash commands
|
|
|
|
if which brew > /dev/null && [ -f "$(brew --prefix)/etc/bash_completion" ]; then
|
2014-06-16 11:01:01 +02:00
|
|
|
source "$(brew --prefix)/etc/bash_completion";
|
|
|
|
elif [ -f /etc/bash_completion ]; then
|
|
|
|
source /etc/bash_completion;
|
|
|
|
fi;
|
2014-05-23 16:11:05 +02:00
|
|
|
|
2014-05-27 11:38:47 +02:00
|
|
|
# Set architecture flags
|
|
|
|
export ARCHFLAGS="-arch x86_64"
|
|
|
|
|
2012-06-18 01:10:31 +02:00
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# PATH
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
2014-09-01 10:59:24 +02:00
|
|
|
# we want the various sbins on the path along with /usr/local/bin
|
|
|
|
PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
|
|
|
|
PATH="/usr/local/bin:$PATH"
|
2014-09-22 17:45:50 +02:00
|
|
|
[ -d "$HOME/.bin" ] && PATH="$HOME/.bin:$PATH"
|
2012-06-18 21:46:35 +02:00
|
|
|
|
|
|
|
# if these bins exist, then add them to the PATH
|
2013-09-03 14:18:40 +02:00
|
|
|
ANDROID_HOME="/usr/local/opt/android-sdk"
|
2014-09-01 10:59:24 +02:00
|
|
|
[ -d "$ANDROID_HOME" ] && PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
|
2012-06-18 21:46:35 +02:00
|
|
|
|
2014-09-01 10:59:24 +02:00
|
|
|
[ -d "/usr/local/mysql/bin" ] && PATH="/usr/local/mysql/bin:$PATH"
|
|
|
|
[ -d "/usr/local/share/npm/bin" ] && PATH="/usr/local/share/npm/bin:$PATH"
|
2012-06-18 21:46:35 +02:00
|
|
|
|
2014-09-01 10:59:24 +02:00
|
|
|
[ -d "$HOME/.rvm/bin" ] && PATH="$HOME/.rvm/bin:$PATH" # Add RVM to PATH for scripting
|
2013-01-27 11:24:46 +01:00
|
|
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
|
|
|
|
|
2014-09-01 10:59:24 +02:00
|
|
|
export PATH;
|
2012-06-18 01:10:31 +02:00
|
|
|
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
# LSCOLORS
|
|
|
|
# ----------------------------------------------------------------------
|
|
|
|
|
|
|
|
export CLICOLOR=1
|
|
|
|
export LSCOLORS=gxfxcxdxbxegedabagacad
|