Skip to content

Instantly share code, notes, and snippets.

@dfenjves
Created June 20, 2016 22:43
Show Gist options
  • Save dfenjves/33a2c0fe8cc02f2ee4b94be2dfb7954a to your computer and use it in GitHub Desktop.
Save dfenjves/33a2c0fe8cc02f2ee4b94be2dfb7954a to your computer and use it in GitHub Desktop.
function prompt {
# Define some local colors
local RED="\[\033[0;31m\]" # This syntax is some weird bash color thing I never
local LIGHT_RED="\[\033[1;31m\]" # really understood
local CHAR="♥"
local BLUE="\[\e[0;49;34m\]"
# ♥ ☆ - Keeping some cool ASCII Characters for reference
# Here is where we actually export the PS1 Variable which stores the text for your prompt
export PS1="\[\e]2;\u@\h\a[\[\e[37;44;1m\]\t\[\e[0m\]]$RED\$(parse_git_branch) \[\e[32m\]\W\[\e[0m\]\n\[\e[0;31m\]$BLUE//$RED $CHAR \[\e[0m\]"
PS2='> '
PS4='+ '
}
# Finally call the function and our prompt is all pretty
prompt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment