Skip to content

Instantly share code, notes, and snippets.

@danomanion
Last active August 29, 2015 14:04
Show Gist options
  • Save danomanion/0c370a631f5a41f80c61 to your computer and use it in GitHub Desktop.
Save danomanion/0c370a631f5a41f80c61 to your computer and use it in GitHub Desktop.
Bash Profile
#function for all the fun GIT stuff, w00t!
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/"
}
export PS1='\[\033[1m\]\[\033[40m\]\[\033[40m\]\[\033[30m\]Mac\[\033[40m\]\[\033[35m\] \w\[\033[0;32m\]$(parse_git_branch)\[\033[35m\]$\[\033[37m\] '
#export PATH="$PATH:~/dev/drush:/usr/local/bin"
# Aliases
# alias drush='~/dev/drush/drush'
alias fixit='drush php-eval "_mongodb_block_rehash(variable_get(\"theme_default\", \"\"))";'
alias bun='bundler'
alias flushy='drush cc registry && drush cc theme-list && drush cc module-list && drush cc theme-registry && drush cc block && drush cc css-js'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment