Skip to content

Instantly share code, notes, and snippets.

@sorenmacbeth
Forked from luikore/bash prompt
Created October 14, 2011 02:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorenmacbeth/1286135 to your computer and use it in GitHub Desktop.
Save sorenmacbeth/1286135 to your computer and use it in GitHub Desktop.
lambda-like bash prompt with git / rvm hints
# mac port installs bash_completion in /opt/local
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
# *
export GIT_PS1_SHOWDIRTYSTATE=1
# $
export GIT_PS1_SHOWSTASHSTATE=1
# %
# export GIT_PS1_SHOWUNTRACKEDFILES=1
export PS1='\[\e[32m\]λ \w\[\e[36m\]$(__git_ps1 " (%s)") [$(~/.rvm/bin/rvm-prompt i v)]\[\e[0m\]\n\[\e[32m\]→\[\e[0m\] '
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment