Skip to content

Instantly share code, notes, and snippets.

@dylandy
Created January 2, 2015 07:59
Show Gist options
  • Save dylandy/a2404765afe0482b4933 to your computer and use it in GitHub Desktop.
Save dylandy/a2404765afe0482b4933 to your computer and use it in GitHub Desktop.
bash_profile for mac
# Change Prompt
# ------------------------------------------------------------
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
PS1+='${debian_chroot:+($debian_chroot)}'
PS1+='\[\033[01;34m\]$(__git_ps1)\[\033[00m\]'
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Set Paths
# ------------------------------------------------------------
export PATH="$PATH:/usr/local/bin/"
export PATH="/usr/local/git/bin:/sw/bin/:/usr/local/bin:/usr/local/:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# Set Default Editor
# ------------------------------------------------------------
export EDITOR=/usr/bin/vim
#alias
alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1)/'"
alias ls='ls -G'
alias la='ls -a'
alias l='ls -GlAhp'
# For colourful man pages (CLUG-Wiki style)
export LESS_TERMCAP_mb=$'\E[01;31m'
export LESS_TERMCAP_md=$'\E[01;31m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
export LESS_TERMCAP_us=$'\E[01;32m'
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
source ~/.profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment