Skip to content

Instantly share code, notes, and snippets.

@vquaiato
Created January 27, 2012 12:57
Show Gist options
  • Save vquaiato/1688657 to your computer and use it in GitHub Desktop.
Save vquaiato/1688657 to your computer and use it in GitHub Desktop.
prompt do terminal
#copy the gist(https://gist.github.com/2550777) to the path below
if [ -f /usr/local/git/contrib/completion/git-completion.bash ]; then
. /usr/local/git/contrib/completion/git-completion.bash
fi
GIT_PS1_SHOWDIRTYSTATE=true
#to show the full directory eg.: "~/Projects/foo_project"
PS1='\[\033[32m\]\u \033[01;34m\][\w]\[\033[31m\]\[\033[31m\]$(__git_ps1)\[\033[00m\] \$ '
#to show the current directory only eg.: "foo_project"
PS1='\[\033[32m\]\u \033[01;34m\][\W]\[\033[31m\]\[\033[31m\]$(__git_ps1)\[\033[00m\] \$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment