Last active
December 18, 2015 03:19
-
-
Save orafaelfragoso/5717505 to your computer and use it in GitHub Desktop.
My new Bash Profile style.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MySQL Path | |
export PATH=/usr/local/mysql/bin:$PATH | |
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then | |
export TERM=gnome-256color | |
elif [[ $TERM != dumb ]] && infocmp xterm-256color >/dev/null 2>&1; then | |
export TERM=xterm-256color | |
fi | |
# Colors | |
DARKRED="\033[0;31m" | |
LIGHTRED="\033[1;31m" | |
DARKYELLOW="\033[0;33m" | |
LIGHTYELLOW="\033[1;33m" | |
DARKGREEN="\033[0;32m" | |
LIGHTGREEN="\033[1;32m" | |
DARKBLUE="\033[0;34m" | |
LIGHTBLUE="\033[1;34m" | |
DARKPURPLE="\033[0;35m" | |
LIGHTPURPLE="\033[1;35m" | |
WHITE="\033[0;37m" | |
BOLD="" | |
RESET="\033[m" | |
parse_git_dirty () { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="\[${BOLD}${LIGHTRED}\]\u \[$LIGHTBLUE\]\W\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \"\")\[$LIGHTYELLOW\] \$(parse_git_branch)\[$RESET\] " | |
#Always use color output for `ls` | |
alias ls="command ls -Gp" | |
# Quick alias for sites | |
alias sites='cd ~/Sites' | |
# Load RVM | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*export PATH=/usr/local/mysql/bin:$PATH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment