Created
April 14, 2014 21:15
-
-
Save tkh44/10683219 to your computer and use it in GitHub Desktop.
dotfiles
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
# Need brew ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
# brew install git bash-completion | |
# if you run into trouble god help you | |
# this should fix your issues sudo chown -R $USER:admin /usr/local | |
MAGENTA=$(tput setaf 9) | |
ORANGE=$(tput setaf 172) | |
GREEN=$(tput setaf 190) | |
PURPLE=$(tput setaf 141) | |
WHITE=$(tput setaf 255) | |
BOLD=$(tput bold) | |
RESET=$(tput sgr0) | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
parse_git_dirty () { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
parse_git_branch () { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" | |
} | |
#Wizardry | |
PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]in \[$ORANGE\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$GREEN\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]" | |
export CLICOLOR=gxfxbEaEBxxEhEhBaDaCaD | |
export LSCOLORS=gxfxbEaEBxxEhEhBaDaCaD | |
bind '"\e[A": history-search-backward' | |
bind '"\e[B": history-search-forward' | |
#If you have sublime 3 these lines will make it your default editor | |
alias subl="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl' -w" | |
alias nano="subl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment