-
-
Save jeffreyroberts/7277873 to your computer and use it in GitHub Desktop.
This file contains 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
# Colors | |
DARK_PURPLE="\[\033[1;34m\]" | |
GREEN="\[\033[0;32m\]" | |
GREY="\[\033[1;30m\]" | |
NORMAL="\[\033[0m\]" | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
# Git shortcuts | |
alias gci='git commit' | |
alias gco='git checkout' | |
alias glg='git log --date-order --all --graph --format="%C(green)%h%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"' | |
alias glg2='git log --date-order --all --graph --name-status --format="%C(green)%H%Creset %C(yellow)%an%Creset %C(blue bold)%ar%Creset %C(red bold)%d%Creset%s"' | |
alias gpl='git pull' | |
alias gpu='git push' | |
alias grb='git rebase' | |
alias gst='git status' | |
# Make list more useful | |
alias ls="ls -lsah" | |
# Make it no matter what | |
alias mkdir="mkdir -p" | |
# Refresh shell | |
alias reload='source ~/.bash_profile' | |
# Look busy | |
alias busy="cat /dev/urandom | hexdump -C | grep 'ca fe'" | |
# Because the dashboard is annoying | |
alias killdash="defaults write com.apple.dashboard mcx-disabled -boolean YES;killall Dock" |
This file contains 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
function parse_vagrant_status { | |
if [[ ! -a 'Vagrantfile' || "$VS" == "OFF" ]]; then | |
return | |
fi | |
status=`vagrant status 2>&1` | |
if [[ -n `echo ${status} | grep "poweroff"` ]]; then | |
echo " [off]" | |
fi | |
if [[ -n `echo ${status} | grep "running"` ]]; then | |
echo " [on]" | |
fi | |
if [[ -n `echo ${status} | grep "aborted"` ]]; then | |
echo " [aborted]" | |
fi | |
return | |
} |
This file contains 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
# Separate aliases file | |
if [ -f ~/.bash_aliases ]; then | |
. ~/.bash_aliases | |
fi | |
# Separate functions file | |
if [ -f ~/.bash_functions ]; then | |
. ~/.bash_functions | |
fi | |
# adding /usr/local/bin | |
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
# rbenv stuff | |
export RBENV_ROOT=/usr/local/var/rbenv | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
# subl is the default editor | |
export EDITOR='subl -w' | |
# ls colors | |
export CLICOLOR=1 | |
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx | |
# use native git completion and prompt info | |
source /usr/local/git/contrib/completion/git-completion.bash | |
source /usr/local/git/contrib/completion/git-prompt.sh | |
GIT_PS1_SHOWDIRTYSTATE=1 | |
GIT_PS1_SHOWSTASHSTATE= | |
GIT_PS1_SHOWUNTRACKEDFILES=1 | |
GIT_PS1_SHOWCOLORHINTS=1 | |
PROMPT_COMMAND='__git_ps1 "$DARK_PURPLE\w$YELLOW$(parse_vagrant_status)$NORMAL" " $GREY$(date "+%H:%M:%S")$NORMAL \n\\\$ "' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment