Skip to content

Instantly share code, notes, and snippets.

@badsyntax
Last active July 14, 2016 03:50
Show Gist options
  • Save badsyntax/8520972 to your computer and use it in GitHub Desktop.
Save badsyntax/8520972 to your computer and use it in GitHub Desktop.
My new bash PS1 prompt (on osx)
alias ls='ls -G'
source /usr/share/git-core/git-prompt.sh
source /usr/share/git-core/git-completion.bash
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWCOLORHINTS=true
GIT_PS1_SHOWUNTRACKEDFILES=true
PS1="\n\[\e[01;34m\]┌─(\[\e[01;35m\]\u@${HOSTNAME%%.*}\[\e[01;34m\])"'$(__git_ps1 "──(\[\e[01;31m\]%s\[\e[01;34m\])")'"\[\e[01;34m\]\n\[\e[01;34m\]└─(\[\e[01;32m\]\w\[\e[01;34m\])──(\[\e[01;32m\]$ \[\e[01;37m\]"
@badsyntax
Copy link
Author

In home directory (not in git repo):

test

In directory with git repo (which contains changes):

test

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