Skip to content

Instantly share code, notes, and snippets.

@dmouse
Created March 28, 2013 06:01
Show Gist options
  • Save dmouse/5261033 to your computer and use it in GitHub Desktop.
Save dmouse/5261033 to your computer and use it in GitHub Desktop.
Bashrc + Drush + GIT Branches
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias dl='drush dl'
alias en='drush en'
alias dis='drush dis'
alias cc='drush cc'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local MORAD="\[\033[1;33m\]"
local LIGHT_BLUE="\[\033[1;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
local DEFAULT="\[\033[0m\]"
PS1="$MORAD\u@\h$WHITE \w$BLUE\$(parse_git_branch) \[\033[00m\]\$ $LIGHT_GRAY"
}
proml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment