Skip to content

Instantly share code, notes, and snippets.

@jnyryan
Last active December 21, 2015 10:07
Show Gist options
  • Select an option

  • Save jnyryan/ca691a7121a9e3ebd643 to your computer and use it in GitHub Desktop.

Select an option

Save jnyryan/ca691a7121a9e3ebd643 to your computer and use it in GitHub Desktop.
#!/bin/sh
curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh
source ~/.git-prompt.sh
export PS1='`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \[\033[01;30m\]\h\[\033[01;34m\] \w\[\033[35m\]$(__git_ps1 " %s") \[\033[01;30m\]>\[\033[00m\] '
# ✔ computername ~/git/BRRPSystem master >
# OR
export PS1='`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \w\[\033[01;30m\] ($(__git_ps1 "%s")\[\033[01;30m\])$\[\033[00m\] '
# ✔ ~/git/BRRPSystem (master)$
# OR
export PS1='`if [ $? = 0 ]; then echo "\[\033[01;32m\]✔"; else echo "\[\033[01;31m\]✘"; fi` \w\[\033[01;30m\] $(__git_ps1 "( %s )")\[\033[01;30m\]\n$\[\033[00m\] '
# ✔ ~/git/BRRPSystem ( master )
# $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment