Skip to content

Instantly share code, notes, and snippets.

@tkh44
Created April 14, 2014 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkh44/10683219 to your computer and use it in GitHub Desktop.
Save tkh44/10683219 to your computer and use it in GitHub Desktop.
dotfiles
# 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