Skip to content

Instantly share code, notes, and snippets.

@rodrigoaguilera
Created November 19, 2014 09:52
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rodrigoaguilera/d6a954a1baad74c2dd0e to your computer and use it in GitHub Desktop.
Save rodrigoaguilera/d6a954a1baad74c2dd0e to your computer and use it in GitHub Desktop.
bash_profile
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
shopt -s globstar
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
# For Mac homebrew
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
for file in ~/.{bash_aliases,bash_exports,bash_functions,bash_extra,bash_prompt}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file"
done
unset file
# Case-insensitive globbing (used in pathname expansion)
shopt -s nocaseglob
# Autocorrect typos in path names when using `cd`
shopt -s cdspell
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
shopt -s autocd
# set PATH so it includes composer's bin if it exists
if [ -d "$HOME/.composer/vendor/bin" ] ; then
PATH="$HOME/.composer/vendor/bin:$PATH"
fi
# The drush bashrc uses readlink and expects the behavior of GNU readlink
alias readlink="greadlink -f"
if [ -f ~/.composer/vendor/drush/drush/examples/example.bashrc ] ; then
. ~/.composer/vendor/drush/drush/examples/example.bashrc
fi
unalias readlink
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment