Skip to content

Instantly share code, notes, and snippets.

@mason-stewart
Created September 27, 2011 15:04
Show Gist options
  • Select an option

  • Save mason-stewart/1245293 to your computer and use it in GitHub Desktop.

Select an option

Save mason-stewart/1245293 to your computer and use it in GitHub Desktop.
bash
NODE_PATH=/usr/local/lib/node_modules
export PATH=/usr/local/bin:/usr/local/lib/node_modules:$PATH
# enable the git bash completion commands
source ~/.git-completion.sh
# DUURRRRTY
export GIT_PS1_SHOWDIRTYSTATE=true
export CLICOLOR=1
export LSCOLORS=gxfxcxdxbxegedabagacad
# Handy dandy shortcuts for lazy people
RVM=$(tput setaf 98)
USERNAME=$(tput setaf 550)
GIT=$(tput setaf 690)
LOCATION=$(tput setaf 176)
TEXT=$(tput setaf 417)
SNOWMAN=$(tput setaf 15)
MU=$(tput setaf 29)
BRIGHT=$(tput bold)
NORMAL=$(tput sgr0)
BLINK=$(tput blink)
REVERSE=$(tput smso)
UNDERLINE=$(tput smul)
# TEH BEST PS1 IN THE UNIVERSE
PS1='${USERNAME}\u${RVM}$(__my_rvm_ruby_version) ${LOCATION}\w${GIT}$(__git_ps1 " (%s)")\n${SNOWMAN}☃ ${MU}μ ${TEXT}'
# This loads RVM into a shell session. YAY!
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
# This puts a space before the RVM output if there is any, making it behave like the __git_ps1,
# which is way better than the normal, super lame behavior.
function __my_rvm_ruby_version {
local rvm_prompt=$(~/.rvm/bin/rvm-prompt v p g)
[ "$rvm_prompt" != "" ] && echo " $rvm_prompt"
}
# Bash completion
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# Load RVM function
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment