Skip to content

Instantly share code, notes, and snippets.

@ded
Created May 17, 2011 03:39
Show Gist options
  • Save ded/975897 to your computer and use it in GitHub Desktop.
Save ded/975897 to your computer and use it in GitHub Desktop.
command line prompt - bash_profile
function prompt {
local WHITE="\[\033[1;37m\]"
local GREEN="\[\033[0;32m\]"
local CYAN="\[\033[0;36m\]"
local GRAY="\[\033[0;37m\]"
local BLUE="\[\033[0;34m\]"
local BROWN="\[\033[0;33m\]"
# export PS1="${GREEN}\u${CYAN}@ ${CYAN}\w${GRAY} "
export PS1="${GREEN}\u${CYAN}\w @${BROWN} \`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (\
.+)$/, '(\1) ')\"\`${WHITE}"
}
prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment