Skip to content

Instantly share code, notes, and snippets.

@emilyst
Created December 11, 2012 19:23
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 emilyst/4261233 to your computer and use it in GitHub Desktop.
Save emilyst/4261233 to your computer and use it in GitHub Desktop.
$PS1 setup and screenshot

My $PS1 setup (depends on git-completion and bash-colors script sourced from (in my case) https://github.com/lilix/dot/tree/master/bin and otherwise installable elsewhere.

[ -n "$(which git-completion.sh 2> /dev/null)" ] && source git-completion.sh
[ -n "$(which bash-colors.sh 2> /dev/null)" ] && source bash-colors.sh

export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWSTASHSTATE=1
export GIT_PS1_SHOWUNTRACKEDFILES=1
export GIT_PS1_SHOWUPSTREAM='auto'

export PS1="${BBlue}\h:${Color_Off}${BGreen}\w${Color_Off} \$(__git_ps1 \"${BPurple}(%s) ${Color_Off}\")${BIYellow}⚡${Color_Off} "

Screenshot:
screenshot of prompt

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