Skip to content

Instantly share code, notes, and snippets.

@adalbertopita
Created March 24, 2016 14:00
Show Gist options
  • Save adalbertopita/25f631dd4bd5ebd7cd2b to your computer and use it in GitHub Desktop.
Save adalbertopita/25f631dd4bd5ebd7cd2b to your computer and use it in GitHub Desktop.
export CLICOLOR=1
export GREP_COLOR='1;37'
export GREP_OPTIONS='--color=auto'
export LSCOLORS=ExFxCxDxBxegedabagacad
# 30: Black | 31: Red | 32: Green | 33: Yellow | 34: Blue | 35: Purple | 36: Cyan | 37: White | green others...
# 0: Normal | 1: Bold
prompt() {
local CYAN='\[\033[0;36m\]'
local PURPLE='\[\033[0;35m\]'
local RED='\[\033[0;31m\]'
local WHITE='\[\033[0;37m\]'
local YELLOW='\[\033[0;33m\]'
local GRAY="\[\033[0;30m\]"
local LIGHT_GRAY="\[\033[1;30m\]"
local LIGHT_YELLOW="\[\033[1;33m\]"
local LIGHT_CYAN="\[\033[1;31m\]"
local LIGHT_WHITE="\[\033[1;37m\]"
export PS1="${GRAY}\u${PURPLE}@${GRAY}\h ${LIGHT_WHITE}\w ${LIGHT_YELLOW}(`~/.rvm/bin/rvm-prompt v`) \$(parse_git_branch) ${RED}$ \[\e[m\]\[\e[m\]"
}; prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment