Skip to content

Instantly share code, notes, and snippets.

@hohonuuli
Last active August 29, 2015 13:56
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 hohonuuli/9213971 to your computer and use it in GitHub Desktop.
Save hohonuuli/9213971 to your computer and use it in GitHub Desktop.
A better prompt
export PS1=$'\n\[\033[35m\]\u@\h:$PWD`git branch 2> /dev/null | grep -e ^* | sed s/"* "// | sed s/^/"\[\033[31\]m ⏣ \[\033[0;32m\]"/`\n\[\033[35m\] \[\033[m\]'
@hohonuuli
Copy link
Author

If git's bash comletion is used, I can use this one instead:

PS1=$'\n\[\033[37m\]\u@\h:$PWD\[\033[0;32m\]$(__git_ps1)\n\[\033[37m\]>> \[\033[m\]'

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