Skip to content

Instantly share code, notes, and snippets.

@dklima
Last active January 10, 2018 11:42
Show Gist options
  • Save dklima/4040c8ed57d3fac88e496b2b1b69c938 to your computer and use it in GitHub Desktop.
Save dklima/4040c8ed57d3fac88e496b2b1b69c938 to your computer and use it in GitHub Desktop.
bash prompt like "pure" theme from zsh (with current git branch)
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
PS1="\n\[\033[94m\]\w\[\033[0m\]\$(parse_git_branch)\[\033[00m\]\n\[\033[1;35m\]❯\[\033[1;33m\] \[\033[0m\]"
export PS1
@dklima
Copy link
Author

dklima commented Jan 10, 2018

selection_368

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