Skip to content

Instantly share code, notes, and snippets.

@moniquelive
Created October 29, 2011 14:21
Show Gist options
  • Save moniquelive/1324502 to your computer and use it in GitHub Desktop.
Save moniquelive/1324502 to your computer and use it in GitHub Desktop.
Bash prompt
NEUTRAL="\[\e[0m\]"
GRAY="\[\e[0;37m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"
YELLOW="\[\e[1;33m\]"
WHITE="\[\e[1;37m\]"
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export PS1="${GRAY}\t \$(__git_ps1 '(${BLUE}%s${NEUTRAL})')${WHITE}\u${NEUTRAL}@${GREEN}\h${WHITE}:${YELLOW}\w${GRAY}$ "
@moniquelive
Copy link
Author

Now with GIT branch name

@moniquelive
Copy link
Author

Simplified it (a lot) by using a GIT function from git-completion.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment